I was working on ASP.NET Core SignalR client application to receive the message from the SignalR hub. This is the scenario where my SignalR server and client were two separate .NET Core applications. In the client application, I got the below error message while trying to receive the message from SignalR Hub. This error may arise and the solution is almost similar for both cases using SignalR Javascript client and .NET Client.

Exact Error Message: “Error: Failed to complete negotiation with the server: Error: Not Found: Status code ‘404’ Either this is not a SignalR endpoint or there is a proxy blocking the connection.”

Earlier code:

var connection = new signalR.HubConnectionBuilder().withUrl("http://localhost:39823/event-hub)

Then to resolve the above error I found that we need to add the below code in HubConnectionBuilder.

skipNegotiation: true,
transport: signalR.HttpTransportType.WebSockets

Note that: The negotiation should be skipped only when the transport property is set to ‘signalR.HttpTransportType.WebSockets‘.


Below is the earlier code with the error.

var connection = new signalR.HubConnectionBuilder().withUrl("http://localhost:4023/yourevent)

Complete code to resolve the issue.

var connection = new signalR.HubConnectionBuilder().withUrl("http://localhost:4023/yourevent", {
    skipNegotiation: true,
    transport: signalR.HttpTransportType.WebSockets

Note: This solution is applicable for both cases either using SignalR .NET Client or SignalR JavaScript client.