Folder-based sites authentication problems

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
7/11/2007 4:24:20 AM
Gravatar
Total Posts 488

Folder-based sites authentication problems

PgSQL version from /trunk, using folder-based installation with 2 child sites.

It seems like site logins are no more independent!

 

1. Rebuild solution, iisreset, remove all cookies (to make sure everything is clean).

2. Go to the first child site and login as user1 - ok.

3. Go to the second child site and login as user2 - ok.

4. Return to the first site - you are no longer logged in, and asp:LoginName control shows "user2".

 

P.S. If I login to the first site again I am automatically logged out from the second one.

P.P.S. Trying to login with admin (available on both sites with the same password) produces the same result.

P.P.P.S. Trying to experiment with all 3 sites produce unpredictable results. For the first time logging in to the main site did not logout me from the child site, but logging in to another child site logged me out from the main site as well. Next time logging in as admin to the main site also logged me in as admin to one of the child sites.

7/11/2007 9:02:34 AM
Gravatar
Total Posts 18439

Re: Folder-based sites authentication problems

Hi Alexander,

Yes there are limitations when using folder based sub sites. I have updated the documentation here. I thought I had already documented this but apparently not.

The issue is that when using folder based sub sites as compared to host name based sub sites is that folder based sites share the same physical cookie file and the same authentication ticket.

I tried to find a solution to make it not show the name in the LoginName control but the idea I had didn't work. LoginName control is not used in mojoPortal, I don't know a solution to make it work as you would like in your custom code. Apparently LoginName just shows whatever value is in Context.User.Identity.Name without first checking if .IsAuthenticated is true. My only suggestion would be to in code set the .Visible property of that control to IsAuthenticated

Hope it helps,

Joe

7/11/2007 9:17:41 AM
Gravatar
Total Posts 488

Re: Folder-based sites authentication problems

asp:LoginName is not really an issue for me, I can change this.

But why does login to one site log me out from all the others??? I am sure that it didn't do so in the past. May be, it is because of your recent changes to mojoMembershipProvider.cs to avoid thread safety errors?

7/11/2007 9:32:13 AM
Gravatar
Total Posts 18439

Re: Folder-based sites authentication problems

I don't think it was a recent change. I've been aware of this behavior since initial implementation of folder sites. If your login is the same in both sites it will not log you out, only if they are different will it log you out.

7/12/2007 8:10:09 AM
Gravatar
Total Posts 488

Re: Folder-based sites authentication problems

That's really strange.

I checked this on our QA site and even tried to get old versions from svn. You are right.

I am still sure it worked, but cannot either reproduce or find an explaination of this.

You must sign in to post in the forums. This thread is closed to new posts.