Reputation: 1286
What is the .NET template for a working ASP.NET Core 6 with SignalR and an Angular ClientApp that has a working WebSockets transport setup?
I can only get the ServerSideEvents transport to work.
dotnet new angular
doesn't have a working SignalR with websockets ...
I can add SignalR, but the websockets don't work
Upvotes: 2
Views: 404
Reputation: 380
You can configure clientside connection with your requirements. If you want websocket connection you have to configure like this:
hubConnection =new HubConnectionBuilder()
.withUrl('your hub url here',HttpTransportType.WebSockets)
.withAutomaticReconnect()
.build()
Upvotes: 1