根目录下的文件允许所有人访问,
在根目录下有一个manage的文件夹,其下有一个login.aspx文件,
要求,manage下访问其它文件都定位到该文件,并通过数据库中验证用户名密码进行登陆还请指点一下,如何配置web.config
在根目录下有一个manage的文件夹,其下有一个login.aspx文件,
要求,manage下访问其它文件都定位到该文件,并通过数据库中验证用户名密码进行登陆还请指点一下,如何配置web.config
http://community.csdn.net/Expert/topic/3973/3973013.xml?temp=.4131739
to:这个帖子好像是将URL重写,和我的这个问题,好像没关系啊
通过使用具有适当的 path 属性的 <location> 标记,可以将配置设置应用于特定的资源。path 属性可用于标识对其应用唯一配置设置的特定的文件或子目录。
例如,下面的配置文件在三个级别指定设置:
应用于当前目录和所有子目录的设置(全部内容包含在顶部 <configuration> 标记中)。
应用于 Sub1 子目录的设置(全部内容包含在 <location> 标记中,路径属性设置为 Sub1)。
应用于 Sub2 子目录的设置(全部内容包含在 <location> 标记中,路径属性设置为 Sub2)。
<configuration>
<system.web>
<sessionState cookieless="true" timeout="10"/>
</system.web>
<!— Configuration for the "Sub1" subdirectory. -->
<location path="sub1">
<system.web>
<httpHandlers>
<add verb="*" path="Sub1.Scott" type="Sub1.Scott"/>
<add verb="*" path="Sub1.David" type="Sub1.David"/>
</httpHandlers>
</system.web>
</location>
<!— Configuration for the "Sub2" subdirectory. -->
<location path="sub2">
<system.web>
<httpHandlers>
<add verb="*" path="Sub2.Scott" type="Sub2.Scott"/>
<add verb="*" path="Sub2.David" type="Sub2.David"/>
</httpHandlers>
</system.web>
</location>
</configuration>
<configuration>
<system.web>
<authentication mode="Forms">
<loginUrl="login.aspx" protection="All" />
</authentication>
</system.web> <location path="manage">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location> </configuration>