Forms Authentication - Access Denied to Login Page


  • I have a very basic forms-based authentication setup based on this tutorial,, no membership or role providers.

    When I deploy to our test IIS server and make sure that authentication setup appears correct with Forms Authentication enabled and Windows Authentication disabled, I receive a 401.2 Unauthorized error from the login page. I can look in the log files and access to default.aspx is doing the correct 302 redirect, while Logon.aspx is throwing the error.

    I have:

    1. Changed the app pool to run under Network Service

    2. Confirmed that Network Service has at least read access to the login.aspx

    3. Added a location section to my web.config to allow="?" for Logon.aspx, although this shouldn't be necessary since Logon.aspx is specified as the loginUrl.

    4. Other stuff that I have forgotten in my pursuit of a solution.

    Here is the relevant section of my web.config:

    <authentication mode="Forms"> <!-- for external use, mode="Forms" / for internal use, mode="Windows" -->
          <forms name=".ASPXFORMSAUTH" loginUrl="Logon.aspx"></forms>
         <deny users="?" />
         <allow users="*" />
      <location path="Logon.aspx">
         <allow users="?" />

    Any help would be appreciated!


    • Dipindahkan oleh Kristin Xie Rabu, 01 April 2015 07.22
    Selasa, 31 Maret 2015 17.23

Semua Balasan

  • Hi Chris,

    According to your description, your case related to Asp.Net. I am afraid you posted in an inappropriate forum.  For questions related to ASP.NET use the ASP.NET forum.    
    You should get more, better and faster answers on the other forum.  Thanks, ahead of time.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Rabu, 01 April 2015 07.22
  • Thanks. Sorry for the confusion
    Rabu, 01 April 2015 14.29
  • While I understand the need to keep forums on topic. Microsoft needs to make sure important questions like this get answered. I searched for exact this problem and found this disappointing dead end. There must be a way to keep this question alive and forwarded to the correct forum. I have no idea if Chris ever got his problem solved. The actual solution appears nowhere in any search engine that I use. Maybe Chris gave up.
    Jumat, 31 Agustus 2018 15.09