I am making a WPF application with two text boxes and one button. One text box for the original text and the other text box for the translated text.
I've completed the "Add Service Reference" pointing to address http://api.microsofttranslator.com/V2/Soap.svc and named the Namespace property to
TranslatorService as mentioned here -
http://msdn.microsoft.com/en-us/library/ff512435.aspx.
My code in the button click event (Visual Studio 2010) is:
string textToTranslate = textBox1.Text;
string sourceLanguage = "en";
string targetLanguage = "de";
string translatedText = "";
try
{
TranslatorService.LanguageServiceClient client = new TranslatorService.LanguageServiceClient();
translatedText = client.Translate("MY-APP-ID", textToTranslate, sourceLanguage, targetLanguage);
textBox2.Text= translatedText;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error");
}
I also have an Application ID (status: enabled) that replaces "MY-APP-ID" in the code above. But, I get this error on debugging the application:

How do I go about it? I'm am a beginner when it comes to development (this is my first application). So I would be glad if you could explain me the problem and the solution in simple words. Thanks in advance! :)
Kunal D Mehta - a Windows Server Enthusiast | I'm on facebook.com/serverbaba