Forms Authentication

  • Thread starter Thread starter Régis Soares
  • Start date Start date
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
 
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)
 
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
 
Back
Top