I'm switching from mvc 3 to mvc 5, I know they changed the authentication in .Net 4.5.1 (OWIN authentication).
all I need it to log in the website so the Request.IsAuthenticated is true, I don't want the membership of Microsoft, I want to use my database.
What I tried is not working even this
var claims = new List<Claim>();
claims.Add(new Claim(ClaimTypes.Name, "Name"));
claims.Add(new Claim(ClaimTypes.Email, "[email protected]"));
var identity = new ClaimsIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie);
var ctx = HttpContext.GetOwinContext();
var authenticationManager = ctx.Authentication;
authenticationManager.SignIn(identity);
I really don't know what to do but I want to be logged in the system using my own database, the has only username and password