locked
Authorization Error with deny users RRS feed

  • Question

  • User1210767569 posted

    I allow users in with Authentication "Forms" but want to authorize users to see files in the apps folder.

    Working code:

    <Authentication mode="Forms">
    <forms loginUrl="gateway/Default.aspx name="form">
    </forms>
    
    </authentication>
    
    

    I want to add in:

    <location path="gateway/apps">
    <system.web>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web>
    </location>

    Wednesday, July 9, 2014 7:07 AM

Answers

  • User-1818759697 posted

    Hi,

    Yes, you could add the above settings within the web.config file to deny all the unauthenticate users to access to the apps folder. I have tested it and it works fine:

      <location path="Apps">
        <system.web>
          <authorization>
            <deny users="?" />
          </authorization>
        </system.web>
      </location>

    Besides, if still could not work, you could tell us the testing environment, such as visual studio 2013 or 2012, OS system, and the created web template in visual studio.

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 9, 2014 10:19 PM