I Have configured the signalr with ASP NET core. When i use local service, it works properly. When i use after host it's not working as expected throws the below error.
Here is the code that i have done.
import * as signalR from '@microsoft/signalr';
const connection: signalR.HubConnection = new signalR.HubConnectionBuilder().withUrl('wss://demo/staging/web-services/hubs/spreadsheethub',
{
skipNegotiation: true,
transport: signalR.HttpTransportType.WebSockets,
}).build();
...
});
connection.on('dataReceived', (data: string) => {
// code
});
connection.start().then(() => {
console.log('server connected!!!');
}).catch(err => console.log(err));