Second level of authentication in an ASP.NET MVC2 application

We have an ASP.NET application that is partly in MVC (the rest is the deprecated CMS web form). The application is authenticated using forms authentication, although any user accessing it from a specific set of IP addresses is automatically assigned to a "special" user.

We currently have a child application that we would ideally like to bring to the (parent) MVC application as an area. This application uses Windows authentication as the second level of authentication. Is there an easy way to keep the second level of authentication (perhaps using the 2nd authorization attribute)? This means that users can log in to this application both inside and outside the set of IP addresses used by the user for special forms authentication, which excludes direct form authentication. We also do not necessarily bind to Windows authentication for this second layer, if that makes the solution simpler.

+3
source share
1 answer

I still have to try, but from what I have seen and tried so far, my solution to my own problem is this:

  • Use forms authentication for a secure area instead of Windows authentication.
  • Create a role for specific users who are allowed access to this area and distribute it accordingly.
  • , . , IP- ( ), . , , RedirectResult RedirectToRouteResult, - WebForms MVC.
  • (), MVC, . (, , -!).

, !

+2

Source: https://habr.com/ru/post/1761908/


All Articles