【发布时间】:2015-02-17 01:12:49
【问题描述】:
我有一个 Asp.net 网站,其中有一个文件夹 /Images。 我设置了我的 web.config 以拒绝匿名用户的访问:如果匿名用户尝试访问 MyWebsite/Images : Erreur HTTP 403.14 - Forbidden ,所以可以这样做。
但是当他们用文件名编写完整的 Url 时: MyWebsite/Images/pict.png ,他们可以打开文件!
我已经在我的 web.config 中尝试过这个,但不起作用...:
<location>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
我有这个认证模式:
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" defaultUrl="~/"/>
</authentication>
【问题讨论】:
标签: authentication iis rights