开发者

web.config location path permission issue

I have a folder that is restricted and only for logged in user. So I wrote these lines:

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

However there is a single file on which I do not want to put any restrictions. What settings should I configure in location tag?

Please don't tell me to move that particular file out of the folder because that is not possible because it is being referenced a开发者_Go百科t many places and I don't want to get messed up.


Try adding the page you want no restrictions on, like this:

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜