I have ASP.NET site.
I can access to the public page, it's OK:
http://mysite/MyPublicFolder/index.htm
But I get 403 error when I try access to the folder:
http://mysite/MyPublicFolder/
MyPublicFolder contains index.htm.
I want Not allow users to browse directory, only Access to all pages in Folder.
We have the following error:
403 - Forbidden: Access is denied
You do not have permission to view this directory or page using the credentials that you supplied.
<location path="/MyPublicFolder">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
I am using IIS 7.5, Windows Server 2008 R2.
Any suggestions?
UPDATE: web.config
Note: v1 is my Public Folder
<location path="v1">
<system.web>
<authorization configSource="Config\system.web.authorization.allow.config" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<add value="index.htm"/>
</files>
</defaultDocument>
<httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Found">
<add wildcard="*" destination="/v1/index.htm" />
</httpRedirect>
</system.webServer>
</location>
<location path="v1/index.htm">
<system.webServer>
<httpRedirect enabled="false" />
</system.webServer>
</location>