IsAuthenticated with multiple cookie

M

Michel Lapointe

Hello,

I currently have two section in my site which required authentication,
to be able to have different section, I've create virtual directory for the
two sections and I've try to use forms authentication with the following
web.config in the root

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>

<location path="sub1">
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name=".General"
loginUrl="/sub1/default.aspx"
timeout="15"
protection="All">
</forms>
</authentication>

<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

<location path="sub2">
<system.web>
<authentication mode="Forms">
<forms name=".Personnel"
loginUrl="/sub2/default.aspx"
timeout="15"
protection="All">
</forms>
</authentication>

<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>

If I go to sub1, I get a request to get authenticated, which is working
fine, however if I try to go to sub2 afterward using the
Request.IsAuthenticated to see if it is, it will return True, base on the
fact that the first forms (sub1) has already put a cookie.

My question is how can I check which cookie has been authenticated, if
possible base on the FORMS name="..."

Thank

ML
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,218
Latest member
JolieDenha

Latest Threads

Top