Answer the question
In order to leave comments, you need to log in
ASP.NET SignalR. Error connecting to WebSocket. What could be the problem?
Hello. Maybe I am asking a lot of questions. I'm trying to connect to SignalR Hub from a SPA application.
this.hubConnection = new HubConnectionBuilder()
.withUrl('http://localhost:*****/testhub')
.configureLogging(LogLevel.Information)
.build()
this.hubConnection = new HubConnectionBuilder()
.withUrl('http://localhost:*****/testhub', {
skipNegotiation: true,
transport: HttpTransportType.WebSockets
})
.configureLogging(LogLevel.Information)
.build()
Answer the question
In order to leave comments, you need to log in
Problem solved. In Startup.cs I moved the UseSignalR line above UseMvc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question