views:

24

answers:

1

I have an Admin folder which contains 4-5 aspx pages. I want to that only user with role="admin" can view those files. What settings i need in web.config?

A: 

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

James Santiago