开发者

Permission on Admin folder, only for role=admin

开发者 https://www.devze.com 2023-01-03 19:29 出处:网络
I have an Admin folder which contains 4-5 aspx 开发者_如何学Pythonpages. I want to that only user with role=\"admin\" can view those files. What settings i need in web.config?Add a location identifyie

I have an Admin folder which contains 4-5 aspx 开发者_如何学Pythonpages. I want to that only user with role="admin" can view those files. What settings i need in web.config?


Add a location identifyier in your authorization area of your web.config file.

<location path="Admin">
 <system.web>
  <authorization>
   <allow roles="Admin"/>
   <deny users="*"/>
  </authorization>
 </system.web>
</location>

This is pretty basic forms authentication use. Maybe you should check out some tutorials of usage of forms authentication.

Google forms authentication: http://www.15seconds.com/issue/020220.htm

0

精彩评论

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