我的应用程序以前运行良好,但是从几天开始,我没有做任何更改,但我得到了例外
System.Net.Http.HttpRequestException: No route to host
完整的例外如下。
{System.Net.Http.HttpRequestException:主机无路由---> System.Net.Sockets.SocketException:主机无路由在<99e6bf942304234315ba19eac23497e256>:0中的System.Net.Http.ConnectHelper.ConnectAsync(System.String主机,System.Int32端口,System.Threading.CancellationToken cancellingToken)[0x00110]中---内部异常堆栈跟踪的结尾---在<99e6bf9d99234215ba19eacc7497e256>:0中的System.Net.Http.ConnectHelper.ConnectAsync(System.String主机,System.Int32端口,System.Threading.CancellationToken cancellingToken)[0x001ac]中在System.Threading.Tasks.ValueTask
1[TResult].get_Result () [0x0001b] in <6de489942345dbea42342d8c6>:0 at System.Net.Http.HttpConnectionPool.CreateConnectionAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00134] in <99e6bf9d99304315ba19eacc7497e256>:0 at System.Threading.Tasks.ValueTask
1 [TResult] .get_Result()中位于<6de48997d0c0445dbea8d4d83492d8c6>:0中的[0x0001b]在System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(System.Threading.Tasks.ValueTask1[TResult] creationTask) [0x000a2] in <99e6bf9d9342043152342eacc7497e256>:0 at System.Threading.Tasks.ValueTask
1 [TResult] .get_Result()[0x0001b]在<6de48997d4234bea8d4d234d8c6>:0中在<99e6bf9d993234a19eacc7497e256>:0中的System.Net.Http.HttpConnectionPool.SendWithRetryAsync(System.Net.Http.HttpRequestMessage请求,System.Boolean doRequestAuth,System.Threading.CancellationToken cancellingToken)[0x00089]中在<99e6bf9d234304315ba19eac2345256>:0中的System.Net.Http.RedirectHandler.SendAsync(System.Net.Http.HttpRequestMessage请求,System.Threading.CancellationToken cancellingToken)[0x000ba]中在System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(System.Threading.Tasks.Task1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x000b3] in <99e6bf9d99304315ba19eacc7497e256>:0 at Refit.RequestBuilderImplementation+<>c__DisplayClass11_0
1 [T] .b__0(System.Net.Http.HttpClient客户端,System.Threading.CancellationToken ct,System.Object [] paramList )<573dbb234a499ea234c22312349ab6>:0中的[0x00115]在/ActivityLogin.cs:624}中的MyApp.Droid.Activities.ActivityLogin.GetToken()[0x000c2]中>我的网址类似于https://someservice.com:8080我还在android清单文件中添加了android:usesCleartextTraffic =“ true”。请在这方面指导我。
我的应用程序以前运行良好,但是从几天开始,我没有进行任何更改,但我遇到了异常System.Net.Http.HttpRequestException:主机没有路由完整的异常如下。 ...
如果与SSL相关,请尝试下面的解决方案可能对您有用