c# - Web Security not working in Chrome and Firefox -


The user I'm currently using Web Security can log in using this code < pre> if (login to the web site (loginRequest.EmailAddress, loginRequest.Password)) {FormsAuthentication.SetAuthCookie (loginRequest.EmailAddress, false); Var userDetails = new string [2]; UserDetails [0] = loginRequest.EmailAddress; Var Current Users = Roles BetterForce User (loginRequest.EmailAddress); UserDetails [1] = Current user [0]. Ostring (); Return feedback = request Creterespons (HTTPPatts Code. Accepted, User Details); }

The login code works, but isAuthentcated always incorrectly returns and the current user name always -1 and all Websecurity methods When I run my application on Chrome and Firefox browsers it is not a good job but it is working well on the IE browser.

What did I remember? Is this an issue? or something else? I get a lot of answers from Google, but they have not helped me

Any one help

According to my knowledge

Formsuthconfook.SetAuthCookie (string, bool); The string for login / out can be used to login / logout in the form of true user / user and bull value.

FormsAuthentication.SetAuthCookie ("user", true); The user will enter and their userID will be in WebSecurity.

FormsAuthentication.SetAuthCookie ("admin"

So you should try the FormsAuthentication.SetAuthCookie ("user", true);

/ P>

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -