several login pages

N

nicholas

Hi,

Got an asp.net application and I use the "forms" authentication mode defined
in the web.config file.

Everything works fine.
But now I would like to add a second, different login page for the users
that go in a specific folder.
How can I do this?

I tried this:

my root web.config contains:
-----------------------------
<authentication mode="Forms">
<forms name="GLWEB.ASPXAUTH"
loginUrl="login.aspx"
protection="All"
timeout="500"
path="/"
/>
</authentication>

<authorization>
<allow users="*" />
<deny users="?" />
</authorization>
-----------------------------

But for the folder /members I want another login page, so I inserted this in
the web.config in the folder /members:
-----------------------------
<authentication mode="Forms">
<forms name="GLWEB.ASPXAUTH"
loginUrl="/members/login.aspx"
protection="All"
timeout="500"
path="/"
/>
</authentication>

<authorization>
<allow roles="member" />
<deny users="*" />
</authorization>
 
F

Frank Mamone

Nicholas,

If you want to do that then you'll have to make your sub-folder it's own
application in IIS. You are probably getting the "MachineToApplicationError"
when you access the sub-folder now, correct?

- Frank Mamone
 

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,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top