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
精彩评论