Link to home
Start Free TrialLog in
Avatar of Phil5780
Phil5780

asked on

ASP.NET restrict folder view access

I'm building a VS2010 ASP.NET website and have an error log folder for saving updated error messages.  I do not want users to be able to browse my "ErrorLogs" folder, which is on the top level of the site.  Here's my current web config markup, but it seems to not be working.  What is wrong with my path?

<location path="ErrorLogs">
            <system.webServer>
                  <directoryBrowse enabled="false"/>
            </system.webServer>
      </location>

Where in the web config should this be?  I cannot locate any reference for this code.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Alfred A.
Alfred A.
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial