小编Myo*_*att的帖子

"基础连接已关闭:发送时发生意外错误." WebClient.OpenRead中的错误(字符串链接)

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

c# asp.net google-api

2
推荐指数
1
解决办法
9077
查看次数

标签 统计

asp.net ×1

c# ×1

google-api ×1