[英]Location tag error in web.config
我正在嘗試為我的網站中的頁面(Master.aspx)設置不同的身份驗證和授權。 我嘗試使用位置標記,但出現錯誤。
我的Web.Config文件中有以下代碼:
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5" executionTimeout="360"/>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
<location path ="Master.aspx">
<system.web>
<authentication mode="Forms">
<forms name ="MasterCookie" timeout="30" loginUrl="Register.aspx" />
</authentication>
<authorization>
<deny users="?"/>
<allow users="admin"/>
</authorization>
</system.web>
</location>
</configuration>
我在17時遇到錯誤:
Line 15: <location path ="Master.aspx">
Line 16: <system.web>
Line 17: <authentication mode="Forms">
Line 18: <forms name ="MasterCookie" timeout="30" loginUrl="Register.aspx" />
Line 19: </authentication>
我發現在位置標簽中不應進行任何身份驗證
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.