2012-10-27 51 views
0

是否有可能通過http://[email protected]:domain.com/folder/和特殊角色訪問一個文件夾? 我用:asp.net中的基本驗證子目錄

<system.web> 
    <authorization> 
    <deny users="?"/> 
    <allow roles="Admin"/> 
    </authorization> 
</system.web> 

它重定向到登錄頁面,但我想,如果他們想通過軟件下載文件中的目標文件夾可以通過輸入用戶下載和通過網絡的形式直接傳遞不

回答

1

這隻能與Basic Authentication。如果您使用表單身份驗證,那麼通過身份驗證的用戶將使用Cookie進行跟蹤,並且您不能使用此類網址。

+0

我應該使用虛擬目錄來實現這一點,或者可以通過web.config在子目錄中? – Moslem7026

+0

下面介紹如何在IIS中啓用基本身份驗證:http://www.iis.net/configreference/system.webserver/security/authentication/basicauthentication –