0

I have an ASP.NET Core application, running on .NET Framework 4.6.2. I managed to run SignalR 2 by using owin-middleware. The issue is that it uses server events, instead of websockets. Is there any setup that can be done, in order to use websockets? enter image description here

In Startup.cs I am calling both app.UseWebSockets(); app.UseSignalR2() // custom extension method maps signalR to appbuilder

If specifying only webSockets transport, it doesn't have any errors, but it does not connect.

I have used a similar setup using a ASP.NET MVC project, and it worked as expected, this only reproduces when using ASP.NET Core on .NET Framework.

I found some similar posts, but I was not able to run it using websockets: Using SignalR on an asp.net Core app that targets the full .NET Framework

Andrei S
  • 181
  • 1
  • 9

1 Answers1

0

This looks like it's missing the UseWebSockets method:

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider)
{
        app.UseWebSockets();
}
Camille Wintz
  • 951
  • 7
  • 8