authentication - WebSecurity.CurrentUserId not working after migrating signalR 1.1.2 to signalR 2.0.0 -


I upgraded my signal R version to 1.1.2, after this link CDR 2.0.3 and everything else Ok, but WebMatrix.WebData .WebSecurity.CurrentUserId does not have any empty values ​​when I call any method of any hub in the server.

This is my startup file:

  using Microsoft.Owin; Use of ovine; Using Microsoft.AspNet.SignalR; [Assembly: Owen startup (Taipf (Signlarcatkstartap))] namespace Signlarkat {public class startup {public void configuration (IAppBuilder app) {AppkMapSignalR (new hub configuration (Resolver = GlobalHost.DependencyResolver}); GlobalHost.HubPipeline.RequireAuthentication ();}}}   

And this is one of my hubs:

  [Authorized] Public class messages: Hubs {... public work Send message (int destination id, string msg) {int userId = WebMatrix.WebData.WebSecurity.CurrentUserId; // exception file Is ...}}   

Code was this code work before you upgrade to v 2.0.3, so I do not know what I'm missing you.

Latets Owin version used in signal r (& gt; 2.0.0) (2.0.0) Webmatrix.WebSD is not compatible with .WebSecurity. Instead, it can be replaced with AspNet.Identity.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -