Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Failed to connect SignalR with host ip address by wsl2 mirrored network

$
0
0

I can run blazor web application on wsl2 which use mirror network but when I changed ip address from localhost to host ip address, I got error

fail: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[10]      Failed to start connection. Error getting negotiation response from 'http://192.168.30.53:7780/chathub'.      System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 120 seconds elapsing.       ---> System.TimeoutException: The operation was canceled.       ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.       ---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled.       ---> System.Net.Sockets.SocketException (125): Operation canceled         --- End of inner exception stack trace ---         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)         at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)         at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)         --- End of inner exception stack trace ---         at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)         at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)         at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)         at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)         at Microsoft.AspNetCore.Http.Connections.Client.Internal.AccessTokenHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)         at Microsoft.AspNetCore.Http.Connections.Client.Internal.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)         at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)         --- End of inner exception stack trace ---         --- End of inner exception stack trace ---         at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)         at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken)dbug: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[5]      Skipping dispose, connection is already disposed.An error occurred at open hub player list : The request was canceled due to the configured HttpClient.Timeout of 120 seconds elapsing.

If I replaced host ip address by localhost again, SignalR works no problem.How to solve it so that I can use host ip address to run SignalR on blazor web application?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>