Forms Authentication

R

Régis Soares

Hi!

How can I put two login pages in my Web Application?

for example:

....
<authentication mode="Forms">
<forms name="Auth1" loginUrl="LoginPage1.aspx" />
</authentication>

<authentication mode="Forms">
<forms name="Auth2" loginUrl="LoginPage2.aspx" />
</authentication>
....

<location path="Foder1">
<system.web>
<authorization>
<deny users="*" /><!-- the user must be redirected to LoginPage1.aspx -->
</authorization>
</system.web>
</location>

<location path="Foder1">
<system.web>
<authorization>
<deny users="*" /><!-- the user must be redirected to LoginPage2.aspx -->
</authorization>
</system.web>
</location>

Thanks
 
G

Guest

If you have only one login page you can still execute different logic based
on the ReturnUrl parameter of the Querystring (no need for having 2 login
pages)
 
R

Régis Soares

If you have only one login page you can still execute different logic
based
on the ReturnUrl parameter of the Querystring (no need for having 2 login
pages)

but I need to have two login pages in my web application. one for the Admins
and other for the Customers.
so, if the user try to access the folder Admin , it must be redirected to
/Admin/Login.aspx. or if the user try to access the folder Customers, it
must be redirected to /Customers/Login.aspx.

I don't know it is possible without to create a new virtual directory.

thanks
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top