我面临错误"基础连接已关闭:发送时发生意外错误." 获取返回数据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();
}
Run Code Online (Sandbox Code Playgroud)