我正在尝试从此链接中的 Windows Store App 中的 Microsoft Translator 示例代码
示例代码在这里给出
当我运行该应用程序时,出现异常“远程服务器返回了意外响应:(417) 预期失败”
此异常发生在以下行:
germanTranslationTextBlock.Text = await webService.TranslateAsync("Bearer " + accessToken.access_token, sourceTextBox.Text, "en", "de", "text/plain", "");
PS我在代理后面。一些谷歌搜索显示这System.Net.ServicePointManager.Expect100Continue = false;
是解决方案,但我不知道如何为 Windows Store App 做到这一点。