Logging in a user onto one site logs out a user on another!

I am building a CMS application. All is on one computer during development using Visual Web Developer 2008 Express Edition and Windows XP Professional.

Simply, I have one set of pages and each website's domain name points to the same pages, which load different data from the database, depending on the domain name.

I am using the membership and roles framework but have left the applicationName blank in the roleManager and membership providers so that, as authenticated users create an account, a different applicationID is created for each domain name.  This way, the users and roles are segrated into their own applications and the same usernames and role names can be used in different applications.

I have set up two domain names, one.com and two.com, with one user account on each but no roles.  I open both in separate browser windows in IE7, login the user on one.com and then log in the user on two.com.  When I return to one.com and refresh the page the user has logged out!

I get the same problem if I open both domains in Firefox.

If I open another instance of IE7, or use Firefox, for one of the domain names, I don't have a problem.

Any help much appreciated.

Thanking you in anticipation.


0 rogerwithnell 11/17/2008 7:48:08 PM

The Forms Authentication Ticket that is received as a proof of a login is stored as a cookie on the user's computer.

If You then login twice using the same browser, the two browser instances will fight each other over that cookie and You will see a number of strange behaviours.

You can find a forum post about how to do it in Firefox here: http://forums.mozillazine.org/viewtopic.php?f=8&t=916705 .

It is a pretty extreme behaviour that the user should be able to be logged in twice with same browser, so if this is not a specific requirement from your customer, I wouldn't spend more time investigating it further if I were You.

Andreas Paulsson
Software Developer
cimkey AB
0 Andreas 11/18/2008 7:12:58 AM

Thanks for your reply.

I hope that I made it clear that the two tabs in question are addressing different domain names but point at the same directory to access the files.

Surely the cookies would be distinct under these circumstances? 

0 rogerwithnell 11/19/2008 10:30:29 AM

(Thread closed)