Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Info: Users are being automatically logged off
Roger Martin
#1 Posted : Tuesday, 2 March 2010 12:25:51 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

You may notice that users sometimes have to log in again while they are using GSP.

This is caused by the recycling of the application domain, which clears out the session state and causes the server to lose all memory of those who are logged in. It is an annoying problem that plagues ASP.NET developers.

What causes the app domain to recycle? There are many reasons - here are a few of the most popular:

IIS may be configured to auto-recycle every X minutes
The default is 1740 minutes (29 hours). You can adjust the recycling settings in IIS Manager.

User deletes an album
Since albums are mapped to directories on the file system, deleting an album deletes a directory. ASP.NET is designed to automatically recycle whenever a directory is deleted within the web application heirarchy. To prevent the recycling, change the location of your mediaobjects directory to a folder outside the web application path. You can also create a junction point.

Changes to config files and assemblies in the bin directory
Editing web.config, machine.config or the assemblies in the bin directory can cause the app to recycle.

Here is a nice blog post that gets into some more detail about app domain recycling.

The easy fix: Move session storage
You can avoid losing your session state (and thus your logged on users) by moving session storage out of the app domain process. You have two choices: move it to the ASP.NET State Service or SQL Server. Documentation for both of these are easy to find, but here is a quick tutorial to configure GSP to use the ASP.NET State Service:

1. Start the Services applet on the server (Type services.msc in the Start menu).

2. Double click the ASP.NET State Service and configure it to start automatically. Then manually start it.

3. Open web.config for GSP and update the <sessionState> element to this:

Code:
<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1" cookieless="false" timeout="60"/>


After moving session storage to an external process, your users should remain logged in even if the application domain recycles.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Jimmy Draw
#3 Posted : Monday, 31 May 2010 3:07:32 PM(UTC)
Rank: Member

Joined: 31/05/2010(UTC)
Posts: 6
Location: Plymouth, Mn

Since you use discountasp.net for hosting, do you know if either of these can be used at discountasp.net?
jkirklen
#4 Posted : Monday, 21 June 2010 10:26:52 AM(UTC)
Rank: Member

Joined: 16/06/2010(UTC)
Posts: 4

I started having this issue on my site after I added GalleryServerPro to the site. I've since backed out all of the GSP .dlls, files/folders and web.config changes, but am still having users lose their session. Is there something esle that changed when I added GSP to the site that caused this to start happening?
Roger Martin
#5 Posted : Tuesday, 22 June 2010 1:14:14 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

GSP doesn't permanently change anything, so if you reverse your integration steps, you should be back to where you started.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Roger Martin
#6 Posted : Tuesday, 22 June 2010 1:15:06 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Jimmy - I don't know if you can use the session state server with DiscountASP.NET.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
markharle
#8 Posted : Tuesday, 15 February 2011 7:37:04 AM(UTC)
Rank: Newbie

Joined: 15/02/2011(UTC)
Posts: 3

Hello, I have encountered this logout issue on various DNN modules, including GSP, on DNN 5.6.1. In my instance, the logout occurred when the module was on a child portal, and the user did not have an account on the root portal. When I added a corresponding user account on the root portal, the logout no longer occurred.
Mark
harrycrony
#10 Posted : Tuesday, 9 August 2011 10:40:13 PM(UTC)
harrycrony

Rank: Newbie

Joined: 9/08/2011(UTC)
Posts: 1
Man
Location: 1905 Willow Ave, Weehawken, NJ 07086

Unable to understand the issue as new to the forum. Explain in detail so that I can help you.
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.