I was trying to have something like this:
CustomUser u = this.HttpContext.User.Identity as CustomUser;
My LogOn actions is this:
public ActionResult LogOn(CustomUser u)
IPrincipal principal = new CustomPrincipal(u.Login, u.Password); //in here, I create a new CustomUser and validate login/password
u = principal.Identity as CustomUser;
this.HttpContext.User = principal;
return RedirectToAction("Welcome", "Members");
On Members/MyWelcome action the HttpContext.User's type is always GenericPrincipal, and it should be CustomPrincipal.
Am i missing something?
View Complete Post