0

I'm working on an ASP.NET MVC 4.5.1 project and I'm trying to get Forms Authentication to work with System.Web.Security. The .ASPXAUTH cookie is being created successfully, but the Authorize attribute on the Home Controller is ignoring it.

BTW, this application is currently in development, so I'm not hitting a database yet.

Any ideas why?

King Wilder
  • 629
  • 1
  • 7
  • 19
  • what is the full assembly name of [Authorize]? – Fabio Dec 17 '15 at 22:16
  • System.Web.Mvc.AuthorizeAttribute - v5.2.2. This is the default attribute, I didn't create something custom, if that's what you are wondering. – King Wilder Dec 18 '15 at 17:03
  • I'm not sure why [Authorize] is not working, but I believe the problem is the FormsAuthentication class from System.Web.Security. FormsAuthentication is an old way to handle authentication. Try to use OWIN, it works better. See an example at http://stackoverflow.com/questions/32095889/mvc-authentication-easiest-way – Fabio Dec 18 '15 at 17:35

0 Answers0