ASP.NET 2.0 Form Authentication in different folders- problem

D

drasko

Hi,

I have the following structure of my web-site
root
|
-folder1 (secure)
|
-folder2 (secure)

Now, as you can see, both folders are secure and need to have
different login forms (one login form will have only password
field!!!) How can I do this, or in other words, how should I change my
web.config files in root, folder1 and folder2 directories. Root folder
is public. I don't want to add virtual directories!

Thanks in advance!

D
 
D

drasko

I think what you should really be doing is have *one* login form

Thank you for your answer. But I really need two login forms. Or, can
I do some workaround with only one login form to achieve goals
described in previous letter?

D
 
J

Juan T. Llibre

re:
!> I really need two login forms.

No, you don't... ;-)

re:

!> Or, can I do some workaround with only one login form to achieve goals
!> described in previous letter?

Indeed, you can.

Look into the <location...> web.config element :

http://support.microsoft.com/kb/316871

http://msdn2.microsoft.com/en-us/library/ms178692(VS.80).aspx

Configure your secure locations in the root web.config...

http://msdn2.microsoft.com/en-us/library/aa302435.aspx

Check the "authentication" section :

<forms loginUrl="Restricted\login.aspx"
protection="All"
requireSSL="true"
timeout="10"
name="AppNameCookie"
path="/FormsAuth"
slidingExpiration="true" />
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top