SignalR + .NET Core – Unable to handshake, negotiate return 204

This is a very common issue with setting up SignalR 1.1 on .NET Core, the 204 Negotiate sent from the SignalR client may take you hours to figure out.

The problem is setting up Cross Origin Policy. You should move the Cors setup to Configure section on the Startup file. So far this is a solution, I will investigate more of the cause and update this post later.

<code>

app.UseCors(builder =>

            {

                builder.WithOrigins(“http://localhost:3000”)

                .AllowAnyHeader().AllowAnyMethod().AllowCredentials();

            });

</code>

Posted by justinpham

Leave a Reply