I'm having a problem with my Custom Membership provider, which extends ExtendedMembershipProvider.
After Running WebSecurity.Login, which successfully executes my Implemented Validate method, the User.Identity.IsAuthenticated is not set.
But Inspecting the WebSecurity.IsAuthenticated, it's true. Also, the CurrentUserName is set witrh my user name,. but the CurrentUserId says "An exception has been thrown."
If I inspect the exception and, after having checked the code, I discovered that the GetUser(string username, bool isUserOnline) method of my Provider, is receveing the username param as null...
I just discovered my problem. On my Login Action of my Controller, I was returning a view. As I understand, I had to RedirectToAction because User is set after doing a request.
This is what I had:
This is what I have now, and works: