REPOST: Forms authentication in multiple folders

  • Thread starter Thread starter Harley
  • Start date Start date
H

Harley

i have an application that uses forms security to restrict access to a
specific folder. now i need to secure another folder, in the same root, but
redirect those users to another login. imagine, one folder for managers,
another for assistants. no shared options between them, so dont try to
suggest profiles =)

the current configuration uses a web.config file on the root folder with
this structure:

<configuration>
<system.web>
..
..
..
<authentication mode="Forms">
<forms name="InterMedia.PaymentsMerchantLogin"
path="/"
loginUrl="manager/login.aspx"
protection="All"
timeout="10">
</forms>
</authentication>
<identity impersonate = "true"/>
<authorization>
<allow users="*" />
</authorization>
..
..
..
</system.web>
<location path="manager">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
..
..
..
</configuration>

this redirects users to manager/login.aspx to all users trying to conect to
the /mananger folder.

now i need to secure another directory. i want to redirect users conecting
to /affiliates to affiliates/login.aspx.

if i use a different <location> section i get an
error.

what should i do?
 
Harley said:
i have an application that uses forms security to restrict access to a
specific folder. now i need to secure another folder, in the same root, but
redirect those users to another login. imagine, one folder for managers,
another for assistants. no shared options between them, so dont try to
suggest profiles =)

the current configuration uses a web.config file on the root folder with
this structure:

<configuration>
<system.web>
.
.
.
<authentication mode="Forms">
<forms name="InterMedia.PaymentsMerchantLogin"
path="/"
loginUrl="manager/login.aspx"
protection="All"
timeout="10">
</forms>
</authentication>
<identity impersonate = "true"/>
<authorization>
<allow users="*" />
</authorization>
.
.
.
</system.web>
<location path="manager">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
.
.
.
</configuration>

this redirects users to manager/login.aspx to all users trying to conect to
the /mananger folder.

now i need to secure another directory. i want to redirect users conecting
to /affiliates to affiliates/login.aspx.

if i use a different <location> section i get an
error.

what should i do?

You should either use two separate web applications, or you should use the
same login page for both kinds of users.
 
Back
Top