locked
Does signalR backplane shares connections also? RRS feed

  • Question

  • User-1586677513 posted

    Does signalR backplane shares the connection information also?

    I mean in case of "longpolling" the connect request goes to one server and start server goes to another server then it gives this error
    "The ConnectionId is in the incorrect format."

    I am believing  that this error is coming because the instance on which this request is going does not have any information about this connection id. I am using SQL server backplane but still facing this problem.

    We are not supposed to use sticky session in our production environment

    Monday, June 1, 2015 8:01 AM

Answers

  • User1711366110 posted

    Does signalR backplane shares the connection information also?

        As far as I know, SignalR Sqlserver backplane doesn't share the connection details .SignalR with SQL Server Scaleout requires that all servers which handle SignalR requests must share a machine key. So the connectionToken is encrypted using the machine key. When an application hits server 1 it is assigned a connectionToken generated using that system's machine key. If the application then hits server 2 with that assigned connectionToken, machine 2 cannot decrypt the token unless is has a matching machine key.

    this issue may happen for logging out while the connection is still active results in losing the user association .so you have to make sure that the connectionId is associated with the correct user.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 3, 2015 4:47 AM

All replies

  • User1711366110 posted

    Does signalR backplane shares the connection information also?

        As far as I know, SignalR Sqlserver backplane doesn't share the connection details .SignalR with SQL Server Scaleout requires that all servers which handle SignalR requests must share a machine key. So the connectionToken is encrypted using the machine key. When an application hits server 1 it is assigned a connectionToken generated using that system's machine key. If the application then hits server 2 with that assigned connectionToken, machine 2 cannot decrypt the token unless is has a matching machine key.

    this issue may happen for logging out while the connection is still active results in losing the user association .so you have to make sure that the connectionId is associated with the correct user.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 3, 2015 4:47 AM
  • User-1586677513 posted

    I got the problem. Its machine key issue only. I had to explicitly add machine key in web.config of my application. Then it is able to unprotect the token which is generated by another instance of my application. Now its working fine.

    Wednesday, June 3, 2015 7:55 AM