I understand why SignalR doesn't give you access to the HttpContext. However, this is quite problematic for us. Let me explain:
Our application is a Multi-Tenant application where the user chooses the environment while logging in. This basically registers the ConnectionStringName in the HttpSession. In our SignalR Hub, we need to access the database on Disconnect
. But this is not possible because we have no HttpContext at this point and cannot determine the environment to write to.
Can anyone provide us with a suggestion how to solve this problem? We're a bit stuck on this one.
EDIT: Bonus point if your solution works in a Load-Balanced environment.