请问解决了么?我最近也遇到这个问题
net core 3.1 通过code换取网页授权access_token和openid 报错?net core 3.1 通过code换取网页授权access_token和openid 时候报错了 var url = $"https://api.weixin.qq.com/sns/jscode2session?appid={ _wechatConfigOptions.Value.ProcessAppId}&secret={ _wechatConfigOptions.Value.ProcessSecret}&js_code={code}&grant_type=authorization_code"; public async Task<string> GetHttpAsync(string urladdress) { using (WebClient MyWebClient = new WebClient()) { MyWebClient.Credentials = CredentialCache.DefaultCredentials;//获取或设置用于向Internet资源的请求进行身份验证的网络凭据 Byte[] pageData = await MyWebClient.DownloadDataTaskAsync(new Uri(urladdress)); //从指定网站下载数据 return Encoding.UTF8.GetString(pageData); //如果获取网站页面采用的是UTF-8,则使用这句 } } 下面是错误 "System.Net.WebException: The SSL connection could not be established, see inner exception. Authentication failed because the remote party has closed the transport stream. ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest) --- End of stack trace from previous location where exception was thrown --- at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at System.Net.HttpWebRequest.SendRequest() at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.GetWebResponseTaskAsync(WebRequest request) at System.Net.WebClient.DownloadBitsAsync(WebRequest request, Stream writeStream, AsyncOperation asyncOp, Action`3 completionDelegate) at Sxl.Client.Web.Service.HttpService.GetHttpAsync(String urladdress) in C:\Users\Administrator\Desktop\Sxl.Client.Web\Sxl.Client.Web\Service\HttpService.cs:line 41 at Sxl.Client.Web.Controllers.WeChatController.LoginMiniProcessAsync(String code) in
2021-08-10请问你解决了么?我也遇到相同的问题,不知道哪里的问题
Net Core服务端请求微信api报ssl无效怎么解决?请问Net Core服务端请求微信接口(https://api.weixin.qq.com/sns/jscode2session)报ssl无效怎么解决? 错误:The SSL connection could not be established, see inner exception. The remote certificate is invalid according to the validation procedure.
2021-08-10请问有解决方案么?
【错误信息】:错误代码:48001, 错误信息:API 功能未授权?【错误信息】:错误代码:48001, 错误信息:API 功能未授权,微信原始报文:{"errcode":48001,"errmsg":"api unauthorized rid: 5f714450-31a74409-24df03ef"} 接口:POST https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN [图片]
2021-06-23