【发布时间】:2015-03-30 21:23:58
【问题描述】:
我正在尝试使用 WebClient 获取 google 帐户的身份验证令牌。
WebClient client = new WebClient();
client.OpenReadCompleted += client_OpenReadCompleted;
client.OpenReadAsync(new Uri("https://www.google.com/accounts/ClientLogin?accountType=GOOGLE&service=writely&source=1C&Email=myemail@gmail.com&Passwd=mystrongpassword", UriKind.Absolute));
当 client_OpenReadCompleted 抛出异常:
"The remote server returned an error: NotFound."
如果我知道 URL 请求 100% 有效,我该怎么做才能解决这个问题?
提前致谢!
【问题讨论】:
-
显然连接已打开,因此阻止您的不是 https 部分。您提供的其他内容不正确。
-
它可能是什么“别的东西”?邮箱和密码正确。或者也许我必须修改我的代码?
标签: c# windows-phone-8 webclient