0

From how I've understood it HTTPContext.Current is not always available for a SignalR Hub to access, so we should look to use Context.* or Context.Request.GetHttpContext().

However when I use a PersistentConnection, I don't believe I can use a HubCallerContext and HTTPContext.Current is still not something that is reliable; so what should I be using?

Unified static class between HttpContext and SignalR HubCallerContext

Community
  • 1
  • 1
JoanieBrar
  • 151
  • 4
  • 14
  • 1
    It should be possible to call `GetHttpContext` directly on `request` parameter of PersistentConnection methods. Have you tried this? – Marian Polacek Apr 22 '15 at 10:06

1 Answers1

0

Dax is correct, it is possible to call GetHttpContext directly from the request parameter of the PersistentConnection.

JoanieBrar
  • 151
  • 4
  • 14