收藏
回答

获取openid失败?

调用接口 https://api.weixin.qq.com/sns/jscode2session 经常出现以下错误:

Resource temporarily unavailable (api.weixin.qq.com:443)
 ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|283_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken)
   at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)


回答关注问题邀请回答
收藏

1 个回答

  • 我零0七
    我零0七
    04-17

    这里很有可能是因为DNS解析域名出问题了

    nslookup api.weixin.qq.com 多试几次,看看结果


    04-17
    有用
    回复
登录 后发表内容