【发布时间】:2016-07-01 04:45:45
【问题描述】:
我面临错误“底层连接已关闭:发送时发生意外错误。”在获取google API的返回数据。
在本地很好,但我已经发布并上传到服务器,我遇到了那个错误。请帮帮我..
最好的问候...
WebClient webClient = new WebClient();
Stream stream = webClient.OpenRead("https://www.googleapis.com/oauth2/v1/userinfo?access_token=[Access_Token]);
string b;
/*I have not used any JSON parser because I do not want to use any extra dll/3rd party dll*/
using (StreamReader br = new StreamReader(stream))
{
b = br.ReadToEnd();
}
【问题讨论】:
标签: c# asp.net google-api