I have Angular 6 app with aspnet/SignalR 1.0.3 support for .Net Core 2.1 (Microsoft.AspNetCore.SignalR 1.0.3 NuGet version). On connection, i am getting:
Error during WebSocket handshake: Unexpected response code: 500,
after that fallback to SSE also unsuccessful:
Error: Failed to start the transport 'ServerSentEvents': Error: Error occurred,
and at last, i am connected successfully with Long Polling.
Client code:
public createConnection() {
const options: any = {
transport: 0,
accessTokenFactory: () => 'my token'
};
this._hubConnection = new HubConnectionBuilder()
.withUrl('http://localhost:5000/chathub', options )
.build();
}
When I set transport to 4 (long polling directly) - no errors. Question is why first two (best) transports does not work? Might it be that that latest client package version does not support .Net Core 2.1? Any idea how to avoid this behavior currently?
Thanks!