I am using aspboilerplat framework of .Net core + Angular. I am trying to integrate signalr into the same. I am able to integrate it but getting one issue while we reload the page, there are two signalr connection call one start with \signalr and second \signalr\negotiate. Second call get succeed but first call return 404 error. So can someone help to figure out this issue. What I am doing wrong here. Please find below code that I did.
export class SignalRHelper {
static initSignalR(callback?: () => void): void {
abp.signalr = {
autoConnect: true,
connect: undefined,
hubs: undefined,
qs: 'enc_auth_token=' + encodeURIComponent(localStorage.getItem('enc-auth-token')),
remoteServiceBaseUrl: `${environment.origin}`,
startConnection: undefined,
url: '/signalr',
};
const script = document.createElement('script');
if (callback) {
script.onload = () => {
callback();
};
}
script.src = 'http://localhost:4200/assets/abp/abp.signalr-client.js';
document.head.appendChild(script);
}
}