亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

web.config中如何設置某些目錄需要登錄驗證?

web.config中如何設置某些目錄需要登錄驗證?

繁華開滿天機 2018-10-10 05:06:17
<authentication mode="Forms">      <forms loginUrl="Systems/NewsSystem/admin/Login.aspx" protection="All" timeout="30"name=".ASPXAUTH"             path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx"             cookieless="UseDeviceProfile" enableCrossAppRedirects="false"/>    </authentication>    <authorization>      <deny users="?"/>    </authorization><!--  以上設置是讓這個程序都需要登錄驗證!我在用如下代碼只能讓某些目錄不需要驗證,而我下載的需要恰恰相反,我想只是某個目錄如:Systems/NewsSystem/admin目錄需要驗證!怎么做呀?-->  <location path="Systems/NewsSystem/admin">    <system.web>      <authorization>        <!--deny users="?"/-->          <allow users="?"/>      </authorization>    </system.web>  </location>
查看完整描述

2 回答

?
冉冉說

TA貢獻1877條經驗 獲得超1個贊

把整個程序的設置去掉,只寫location這部分并且寫deny users="?"

查看完整回答
反對 回復 2018-10-24
  • 2 回答
  • 0 關注
  • 606 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號