Context.User is null in a Signalr 2.0 Hub
问题 I'm using VS 2013 Express and the standard MVC5 template to create a new clean app. Authentication is enabled and I can log into the site just fine. I can see the user context in my controllers, but when I add Signalr I can't get the Hubs to register that authentication has take place. Context.User in the hub is null. Using Signalr 2.0.2 and all related OWIN packages. 回答1: The resolution to the program was very simple. In my startup class I had the code in the wrong order. This is what I had