Is there an easy way to do this?
A:
You can use forms authentication which allows you to specify if authenticated users can access pages by groups.
Unless of course you mean "real" directories that contain files. What are you securing? The file system, or the paths to the pages?
Nick DeVore
2010-10-13 15:23:54
I would like to password protect a directory called /admin
Will
2010-10-13 15:41:14
+1
A:
In your web.config, you can use the following:
<location path="AdminDirectory">
<system.web>
<authorization>
<allow roles="Administrators"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
See here: msft.
Forgotten Semicolon
2010-10-13 15:25:35