I recently started using the Signal R library in an ASP.Net MVC 3 application. I can use Signal R to send a message to the client. But I noticed that if I log into the application from another browser, I get the following error -
Exception Type: InvalidOperationException Exception Message: Unrecognized user identity. The user ID cannot change during an active SignalR connection.
Server stack trace: in Microsoft.AspNet.SignalR.PersistentConnection.GetConnectionId (HostContext context, String connectionToken) in Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequest (HostContext context) in Microsoft.AspNet.SignalR.Owin.CallHandler.environment IDictionary 2 environment) at Microsoft.AspNet.SignalR.Owin.Handlers.HubDispatcherHandler.Invoke(IDictionary 2) in Microsoft.Owin.Host.SystemWeb.OwinCallContext.Execute () in Microsoft.Owin.Host.SystemWeb.OwinHttpHandler.BeginProcessRequtext ( httpContext, AsyncCallback callback, optional object data)
And in some cases, I have repeatedly received this error. And the event log is filled in a couple of minutes. I override the OnConnect, OnDisconnect functions in my hub class and initiated a hub connection with a Java script.
source share