i have a problem with my ASP.NET 4.0 Project in MVC3 with MySql membership provider.
The thing is this… when i run my web application in VisualStudio 2010, when i login with FormsAuthentication.SetAuthCookie(mail, true); i get the correct user with Membership.GetUser(), but, if i do a FormsAuthentication.SignOut() and stop my web application, and i create a new user with the ASP.NET Configuration and run the project, if i login with the new user, then the Membership.GetUser() gets the old logged user and not the new one. What i have to do to login and get the correct user, is to stop the ASP.NET Development Server and start again with the run button in vs2010.
Why i have this problem?
Thanks!
I found the problem.. was that i put a static MembershipUser in my class that was calling Membership.GetUser() and that was giving me the wrong user.