How to deny access to a single file? I've tried the code bellow but it didn'd work:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <defaultDocument> <files> <clear /> <add value="index.asp" /> <add value="default.shtml" /> <add value="default.html" /> <add value="index.shtml" /> <add value="index.html" /> <add value="index.htm" /> <add value="Default.asp" /> <add value="Default.htm" /> </files> </defaultDocument> </system.webServer> </configuration> <location path="\riofb02b.myserver.com\wwwparceiro\mydir\test.asp"> <system.web> <authorization> <allow roles="admin"/> <deny users="*"/> </authorization> </system.web> </location>
How to deny access to a single file? I've tried the code bellow but it didn'd work:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.asp" />
<add value="default.shtml" />
<add value="default.html" />
<add value="index.shtml" />
<add value="index.html" />
<add value="index.htm" />
<add value="Default.asp" />
<add value="Default.htm" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
<location path="\riofb02b.myserver.com\wwwparceiro\mydir\test.asp">
<system.web>
<authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location>