FedSSO: Unrecognized user identity. The user identity cannot change during an active SignalR connection RRS feed

  • Question

  • User156682445 posted

    Hi All,

    I am having this strange behavior.

    But first, the SignalR version used is: 1.1.2

    We have different authentication setup which includes FedSSO. One case that is producing an error is an implementation of WS-Federation. 

    Here is the stacktrace:

    Type : System.InvalidOperationException, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Message : Unrecognized user identity. The user identity cannot change during an active SignalR connection.
    Source : Microsoft.Owin.Host.SystemWeb
    Help link :
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void <GetRethrowWithNoStackLossDelegate>b__0(System.Exception)
    HResult : -2146233079
    Stack Trace :
    Server stack trace:
    at Microsoft.AspNet.SignalR.PersistentConnection.GetConnectionId(HostContext context, String connectionToken)
    at Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequest(HostContext context)
    at Microsoft.AspNet.SignalR.Owin.CallHandler.Invoke(IDictionary`2 environment)
    at Microsoft.AspNet.SignalR.Owin.Handlers.HubDispatcherHandler.Invoke(IDictionary`2 environment)
    at Microsoft.Owin.Host.SystemWeb.OwinCallContext.Execute()
    at Microsoft.Owin.Host.SystemWeb.OwinHttpHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object extraData)

    What is strange is that this happen only with our FedSSO implementation using Okta but not on ADFS. It is also working with SAML. 

    This appears to be happening only when longPolling is being used. 

    I would appreciate if someone can point me to the right direction. 

    Here is the link of the screenshot for the Fiddler trace



    Friday, June 19, 2015 8:52 AM


  • User1711366110 posted

    hi leovic,
       According to this case, check the following details :

    1.This error may occur when the auth ticket being used expires or changes while a connection is active.

    2.you can try to disable Anonymous Authentication in the IIS settings

    3.If you use Form Authentication then you can allow user to have one active session

    4.If possible why don't you upgrade your signalr version & check whether this issue will happen or not

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 23, 2015 1:40 AM