Main form and login form in different folders using Forms Authen

B

Bruce

Having a problem on my site when the login form and the main form are in
different apps. When the main app redirects to the login form app,
authorization works but the redirect back always brings up the Windows
password dialog.

If I put the two forms in the same app folder, everything works as expected.

In the former the two apps use identical web.config files (though in
separate folders) and forms authentication is configured correctly. I've even
tried creating a custom validation key in the machine.config file of the
server but the same thing happens.

What am I doing wrong?

Bruce
 
J

Joseph MCAD

April 8, 2005

If the forms are in seperate folders which are configured to be virtual
directories, then you will be prompted to sign in when you browse to each
folder. This is because signing in to one application will grant access to
that application but browsing to the other folder will cause authentication
to be required for that application and folder. I hope you see what I mean.
I would check IIS and make sure that the folders are both not virtual
directories. HTH

Joseph MCAD
 
B

Bruce

They really have to be virtual folders/apps if the login form is an aspx page
that will be run in another folder. The real question is *how* do I do this?
How can I have a login form in another app authenticate the first application?

Bruce
 
J

Joseph MCAD

April 11, 2005

Actually the folder does Not have to be a virtual directory to contain
..aspx pages If it is contained within a virtual directory. Such as...

Root (VDirectory)
-SubFolder (Non VDirectory)
-Login.aspx

Even though the SubFolder is not a vdirectory, it still can contain .aspx
pages, because it is contained within Root which Is a vdirectory. I hope
this makes since. :) Have a great day!

Joseph MCAD
 
B

Bruce

Maybe I'm describing this incorrectly. I have two separate applications. One
of the applications has a login form aspx page. I want to use this page from
the other application. How do I do this?
 
J

Joseph MCAD

April 11, 2005

I understand now. I am not quite sure (as I haven't ever heard of
something like this), but I suppose that you could use Forms Authentication
and create the authentication tickets and cookies yourself. I am not
familiar with creating them yourself, but I do know that you use the
FormAuthentication class for most of it. In both applications you could then
examine the cookie in the same way and if it is not there then redirect to
that application's login page. Having a cookie authenticate to two
applications is as secure as having two seperate ones though. I don't know
whether my above suggestion will work, but you might consider it. Sorry for
misunderstanding and I wish you the best of luck! :)

Joseph MCAD
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top