我在我的web應用程序中創建了一個安全路徑。web.config中的安全路徑/文件夾
喜歡在這個環節提到:http://msdn.microsoft.com/en-us/library/ff648341.aspx
當我使用的安全我的文件下面的配置:
<location path="Secure">
<system.web>
<customErrors mode="RemoteOnly" redirectMode="ResponseRewrite" defaultRedirect="error.html">
</customErrors>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
下面的文件是不可訪問,沒有loign:
my host link /secure/xyz/01.doc
my host link /secure/xyz/01.docx
my host link /secure/xyz/01.xls
my host link /secure/xyz/01.xlsx
但以下文件無需登錄即可訪問:
my host link /secure/xyz/01.pdf
my host link /secure/xyz/01.txt
my host link /secure/xyz/01.png
有關這種行爲的任何想法? 爲什麼辦公文檔文件仍然可訪問? 我需要保護他們。