How to enable ASP.NET identity authentication for a certain page RRS feed

  • Question

  • User-1441453651 posted

    HI, Experts

    I am just getting started ASP.NET Identity.  seems many things changed from the classic Forms Authentication. 

    I created a new ASP.NET project with Forms template in VS 2013. and successfully set up the database and cloud and local IIS etc.  here is the problem I get when I trying to enable the new OWIN/Identity authentication for the whole site. I searched around and seems no one seems talking about how to configure the Identity thing like we did in web.config for Forms authentication.

    To make my question specific, here are the questions I have

    1. How to set authentication for all site and a certain page?
    2. How to set the authorization for site?

    Thanks in advance

    Friday, December 26, 2014 2:45 AM


  • User-1441453651 posted

    OK, I just figured out that the ASP.NET Identity use the same authorization with classic forms authentication.

      <location path="Default.aspx">
            <deny users="?"/>

    I was thought that since Forms authentication is replaced by Identity with OWIN things, everything like authentication, authorization and profile should be all replaced by new things. and I was pretty confused why no body talking about identity authorization?  and I just tried the old style and it works. hope my thread helps any other guys have the same confusing.  google and bing, please index me  :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 26, 2014 3:21 AM