Microsoft.Azure.Relay in Asp.net Core 3.1

0

When i connect my azure hybrid service bus to my console app in c# the conneciton is succeeded, but when i publish my web app in IIS manager it throws me every time this exception :

Microsoft.Azure.Relay.RelayException: Unable to connect to the remote server. TrackingId:03cf9bb3-22a8-4c7d-a4a7-6b36897f4dcf, Address:sb://myservicebus.servicebus.windows.net/hybrid, Timestamp:9/1/2020 11:31:04 AM ---> System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server. ---> System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, 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.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Relay.WebSockets.NetCore21.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options) at Microsoft.Azure.Relay.WebSockets.NetCore21.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options) at Microsoft.Azure.Relay.WebSockets.NetCore21.ClientWebSocket.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.ConnectAsync(CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.ConnectAsync(CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.CloseOrAbortWebSocketAsync(Task1 connectTask, Boolean abort, WebSocketCloseStatus closeStatus, String statusDescription, CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.OpenAsync(CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.OpenAsync(CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.OpenAsync(TimeSpan timeout) at Microsoft.Azure.Relay.AspNetCore.AzureRelayListener.Start() in D:\DataASE\TT.SGDD.WebApi\src\Microsoft.Azure.Relay.AspNetCore\AzureRelayListener.cs:line 187 Unhandled exception. Microsoft.Azure.Relay.RelayException: Unable to connect to the remote server. TrackingId:03cf9bb3-22a8-4c7d-a4a7-6b36897f4dcf, Address:sb://mobileapi-test.servicebus.windows.net/hybrid, Timestamp:9/1/2020 11:31:04 AM ---> System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server. ---> System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, 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.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Relay.WebSockets.NetCore21.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options) at Microsoft.Azure.Relay.WebSockets.NetCore21.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options) at Microsoft.Azure.Relay.WebSockets.NetCore21.ClientWebSocket.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.ConnectAsync(CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.ConnectAsync(CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.CloseOrAbortWebSocketAsync(Task1 connectTask, Boolean abort, WebSocketCloseStatus closeStatus, String statusDescription, CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.ControlConnection.OpenAsync(CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.OpenAsync(CancellationToken cancellationToken) at Microsoft.Azure.Relay.HybridConnectionListener.OpenAsync(TimeSpan timeout) at Microsoft.Azure.Relay.AspNetCore.AzureRelayListener.Start() in D:\DataASE\TT.SGDD.WebApi\src\Microsoft.Azure.Relay.AspNetCore\AzureRelayListener.cs:line 187 at Microsoft.Azure.Relay.AspNetCore.MessagePump.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) in D:\DataASE\TT.SGDD.WebApi\src\Microsoft.Azure.Relay.AspNetCore\MessagePump.cs:line 120 at Microsoft.AspNetCore.Hosting.WebHost.StartAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token) at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host) at TT.SGDD.MobileApi.Program.Main(String[] args) in D:\DataASE\TT.SGDD.WebApi\TT.SGDD.WebApi\Program.cs:line 20

Can anybody help me plz ??

c#
azure
asp.net-core
asked on Stack Overflow Sep 11, 2020 by Ali Saeed

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0