REPOST: Forms authentication in multiple folders

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?
 
J

John Saunders

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.
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top