I have followed the instructions
here and
here to setup SignalR in a ASP.NET Core web app. Then replicated the same code in a Service Fabric ASP.NET Core service only to find that the 100% working code when hosted outside of service fabric did not work when hosted on Service Fabric. When I open
the html client included in both of these samples and turn on developer tools in the browser I see what appears to be the WebSocket handshake failing with HTTP 410 GONE errors.
In the
Service Fabric documentation for ASP.NET CORE I found that the ServiceFabric Middleware can return HTTP 410 GONE if the identifier that validates each request does not match. But I guess I don't understand the inner workings of SignalR to know how to properly
configure Service Fabric to unblock this.
I found someone who have the same issue and solved the issue by using below solution. I suggest you could try to disable Service Fabric Integration in the WebHost Builder.
Use .UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.None) instead of .UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.UseUniqueServiceUrl).
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
None
0 Points
1 Post
Host SignalR ASP.NET Core in Service Fabric
Aug 17, 2019 01:16 PM|vitals|LINK
I have followed the instructions here and here to setup SignalR in a ASP.NET Core web app. Then replicated the same code in a Service Fabric ASP.NET Core service only to find that the 100% working code when hosted outside of service fabric did not work when hosted on Service Fabric. When I open the html client included in both of these samples and turn on developer tools in the browser I see what appears to be the WebSocket handshake failing with HTTP 410 GONE errors.
In the Service Fabric documentation for ASP.NET CORE I found that the ServiceFabric Middleware can return HTTP 410 GONE if the identifier that validates each request does not match. But I guess I don't understand the inner workings of SignalR to know how to properly configure Service Fabric to unblock this.
Any idea what would cause this to be?
Star
9831 Points
3120 Posts
Re: Host SignalR ASP.NET Core in Service Fabric
Aug 19, 2019 05:42 AM|Brando ZWZ|LINK
Hi vitals,
I found someone who have the same issue and solved the issue by using below solution. I suggest you could try to disable Service Fabric Integration in the WebHost Builder.
Use
.UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.None)
instead of .UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.UseUniqueServiceUrl).
Details, you could refer to below article.
https://stackoverflow.com/a/57548849/7609093
Best Regards,
Brando