处理请求时发生未处理的异常。
我得到这些错误,每次我运行我的应用程序在visual studio
An unhandled exception occurred while processing the request.
SocketException: No connection could be made because the target machine actively refused it.
System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:53797)
System.Net.Http.ConnectHelper.ConnectAsync(Func<SocketsHttpConnectionContext, CancellationToken, ValueTask<Stream>> callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
HttpRequestException: Failed to proxy the request to http://localhost:53797/, because the request to the proxy target failed. Check that the proxy target server is running and accepting requests to http://localhost:53797/.
The underlying exception message was 'No connection could be made because the target machine actively refused it. (localhost:53797)'.Check the InnerException for more details.
Microsoft.AspNetCore.SpaServices.Extensions.Proxy.SpaProxy.PerformProxyRequest(HttpContext context, HttpClient httpClient, Task<Uri> baseUriTask, CancellationToken applicationStoppingToken, bool proxy404s)
1条答案
按热度按时间oxosxuxt1#
有两件事我想让你试试-
1.尝试将http更改为https
1.检查启动设置并请求正确的端口号。
请参见以下屏幕截图x1c 0d1x