开发者

authorization web.config

开发者 https://www.devze.com 2022-12-15 10:04 出处:网络
I am restricting access to the Account folder using below: <location path=\"Account\"> <system.web>

I am restricting access to the Account folder using below:

<location path="Account">
  <system.web>
    <authorization>
      <deny users="?"/>
      <allow users="*"/>
    </authorization开发者_运维技巧>
  </system.web>
</location>

and access to the Default.aspx using

<location path="Default.aspx">
  <system.web>
    <authorization>
      <deny users="?"/>
      <allow users="*"/>
    </authorization>
  </system.web>
</location>

but how do I restrict access to a specific file in the Account folder rather than the entire folder?

I tried the following but did not work

<location path="Account\ChangePassword.aspx">
  <system.web>
    <authorization>
      <deny users="?"/>
      <allow users="*"/>
    </authorization>
  </system.web>
</location>


Try this

<location path="Account/ChangePassword.aspx">
  <system.web>
    <authorization> 
      <deny users="?"/>
    </authorization> 
  </system.web> 
</location>
0

精彩评论

暂无评论...
验证码 换一张
取 消