S
Sean
Hi, I've taken over a website, which has an admin section that is
currently open. I added Forms Authentication to the admin directory
with the using the location section in web.config:
<location path="admin">
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name=".COOKIEDEMO" loginUrl="login.aspx"
protection="All" timeout="60" path="/">
<credentials passwordFormat="Clear">
<user name="login1" password="password1"/>
<user name="login2" password="password2"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
To get this to work for a single directory, I had to use IIS and turn
the directory into a web app. This makes the authentication work
correctly, however it breaks all the existing code in admin.
My question is this: Is there a way to use Forms Authentication for a
single directory of a web site, WITHOUT running the directory as a
separate web app? I can't seem to find any documentation on
protecting a single directory.
Thanks in advance. - Sean
currently open. I added Forms Authentication to the admin directory
with the using the location section in web.config:
<location path="admin">
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name=".COOKIEDEMO" loginUrl="login.aspx"
protection="All" timeout="60" path="/">
<credentials passwordFormat="Clear">
<user name="login1" password="password1"/>
<user name="login2" password="password2"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
To get this to work for a single directory, I had to use IIS and turn
the directory into a web app. This makes the authentication work
correctly, however it breaks all the existing code in admin.
My question is this: Is there a way to use Forms Authentication for a
single directory of a web site, WITHOUT running the directory as a
separate web app? I can't seem to find any documentation on
protecting a single directory.
Thanks in advance. - Sean