Answers:
IIS 7具有新的“请求过滤”功能。您可能要使用隐藏的段配置:
<configuration>
<system.webServer>
<security>
<requestFiltering>
<hiddenSegments>
<add segment="BIN"/>
</hiddenSegments>
</requestFiltering>
</security>
</system.webServer>
</configuration>
这将导致http:// yoursite / bin无法使用(但http:// yoursite / binary仍然有效)
检出:http : //learn.iis.net/page.aspx/143/how-to-use-request-filtering
这应该工作:
<configuration>
<location path="FolderName">
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
</configuration>