Remote server returned an unexpected response :(417) Expectation Failed: Using MS Translator API in Windows Store App

StackOverflow https://stackoverflow.com/questions/17349441

I am trying sample code of Microsoft Translator in Windows Store App from this link

The sample code is given here

When I run the app, I get an exception "The remote server returned an unexpected response :(417) Expectation Failed"

This exception occurs on the following line:

germanTranslationTextBlock.Text = await webService.TranslateAsync("Bearer " + accessToken.access_token, sourceTextBox.Text, "en", "de", "text/plain", "");

P.S. I am behind a proxy. Some googling shows that System.Net.ServicePointManager.Expect100Continue = false; is the solution but I do not know how to do that for Windows Store App.

有帮助吗?

解决方案

Could not solve this error, but got a better and infact best source code [which works successfully] for doing text to speech and translate too here.

Could have saved a lifetime if I would have found it earlier, but it's really hard to find any good resources for windows app development.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top