Closed jchannon closed 10 years ago
Turns out I can use Context.User as a property on the hub and make my GetMyAppUserId
method public so i can access it and it all works
@jchannon PEBKAC
:p
Cool - so are you good?
Yup think so, don't understand why Current is null though
HttpContext.Current is not initiated in the context of Signal R. I believe you can use Context.Request.GetHttpContext()
I think Tim is correct, also confirmed by the dfowler it looks like this can't be relied on to be there.
Hi!
In your hub example https://github.com/mdevilliers/SignalR.RabbitMq/blob/master/SignalR.RabbitMQ.Example/Chat.cs if you add
HttpContext.Current
is null.If you take out
GlobalHost.DependencyResolver.UseRabbitMq(configuration);
in Global.asax and run the app up then its no longer null.The issue I have with this is when I use
OnConnected
in my app I add users to a group. The name of the group is determined by an extension method I have onHttpContext.Current
Is this a bug or something dumb I am not understanding?