简体   繁体   中英

SignalR pending Request In IIS

We have a web application with .NET 5 MVC, in which after authentication process we Open the signalR connection.

When we load the same page by duplicate the browser instance, the rest of the user get struct and application stops responding. Also other users are also not able use application.

While viewing currently processing request in IIS -> Worker process it shows all pending connection request with high time elapsed for the open browser instances.

once we close the browser tab, application starts working for other user.

Kindly suggest the solution for the same.

find the below mention code

  var startConnection = function () {

    var signalRConnId = '';

    if (sr_connection == null && spGeneral.useSignalR) {

        sr_connection = new signalR.HubConnectionBuilder().withUrl("/SignalRHub").withAutomaticReconnect().build();
        
        return sr_connection.start().then(function () {

            signalRConnId = sr_connection.connection.connectionId;

            console.log('Signal R Connection Id : ' + signalRConnId);
            console.log('Signal R Started');

            return sr_connection;

        }).catch(function (err) {

            console.error('Signal R Notification Error: ' + err.toString());

        });
    }
    else {
        return sr_connection
    }
}

Server code

public Task SendNotificationAsync(string subcriber,object data) 
{ 
    return _hub.Clients.All.SendAsync(subcriber, data); 
}

It was a problem of windows 10 with IIS 10. We shifted our web app deployment to windows server 2016. So it got resolved.

It seems a problem with Window 10.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM