locked
Host SignalR ASP.NET Core in Service Fabric RRS feed

  • Question

  • User-708834640 posted

    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?

    Saturday, August 17, 2019 1:16 PM

All replies

  • User283571144 posted

    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

    Monday, August 19, 2019 5:42 AM