Using formsauthentication for login and use HttpContext.Current.User.Identity
问题 I have made a website with a page that includes a razor form. The user can login on this form and then redirects to a different page. The logging in (and logging out) works with formsauthentication succesfully. However, I can't seem to use HttpContext.Current.User.Identity.Name to retrieve the stored username (in the formsauthentication cookie). It returns an empty string "". I am using MVC 5 and ASP 4.5 with no standard membership or role providers. Login: [HttpPost] public ActionResult