我的網站有2個登錄。 1在前端爲常規用戶,一個在管理部分,爲管理員(我需要2登錄,因爲每個人要求不同的登錄標準)。爲了驗證admin目錄,我安裝在我的主網站的web.config「位置」元素是這樣的:web.config中的錯誤「位置」
<location path="Admin">
<system.web>
<authentication mode="Forms" >
<forms loginUrl="/Accounts/adminLogin.aspx"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
如果我試圖從我的「管理」目錄中輸入任何頁面,進入我的瀏覽器,我收到以下錯誤:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
如何設置我的位置元素以正確重定向?
感謝
第一個問題 - 您是否將虛擬目錄設置爲IIS中的應用程序? – Tim 2013-02-22 06:22:16