microsoft / service-fabric-aspnetcore

This repo contains ASP.NET Core integration for Service Fabric Reliable Services.
Other
153 stars 50 forks source link

SignalR & Autofac: Client disconnects on WS/SSE #60

Closed darrenfurr closed 6 years ago

darrenfurr commented 6 years ago

Server: Microsoft.AspNetCore - 2.1.1 Microsoft.AspNetCore.SignalR - 1.0.1 Microsoft.ServiceFabric - 6.2.301 Microsoft.ServiceFabric.AspNetCore.Kestrel - 3.1.301

Client: "@aspnet/signalr": "^1.0.0"

Operating Systems: Windows 10 Enterprise Version 1803

Browsers: Chrome 67.0.3396.99 (Official Build) (64-bit)

When utilizing SignalR with the latest version of ServiceFabric - our angular client disconnects after 30 seconds.

Error on the client: Error: Connection disconnected with error 'Error: Server timeout elapsed without receiving a message from the server.'.

Attempted troubleshooting steps:

Any help here would be appreciated.

amanbha commented 6 years ago

@darrenfurr, this repo is for the aspnetcore Service Fabric integration libraries. Ideally this should be opened in SignalR repo, but I can try to take a look at it, Could you please share a sample repro for this.

darrenfurr commented 6 years ago

@amanbha - I'm working on spinning up a PoC, gathering logs. I'll send a link to the repo

darrenfurr commented 6 years ago

@amanbha - it appears that after spinning up a PoC, this issue was caused by my autofac implementation. It appears to be related to how I was registering the autofac container with aspnetcore.

Inside the Configure method, I was doing: app.ApplicationServices = new AutofacServiceProvider(this.Container);

And then inside of ConfigureServices: return services.BuildServiceProvider();

I removed the app.ApplicationServices setter & inside ConfigureServices did: return new AutofacServiceProvider(this.Container);

And - it's all working now.