PDA

View Full Version : Logout Issue


kithkanan
09-28-2008, 03:15 AM
Hi,

I deployed an application here and when I tried to login and browse, it keeps on logging me off. Approximately every 5 minutes. I haven't assigned any sessions or cookies with this behavior. Does the server has an option for applications' sessions that I missed? Please help me. This logout stuff is really annoying and I bet my visitors won't like it :(

aabragan
09-28-2008, 03:56 AM
I am having the exact same problem with my ASP.NET 2.0 application. I have tried a number of coding solutions to circumvent this problem but can't get the system to keep me from logging out after a couple of mins. I think there is something wrong with the discountasp.net servers because I do not have this problem on my test servers at all!!

PLEASE HELP!!

aabragan
09-28-2008, 04:02 AM
I forgot to mention in my last post, I tried a cookieless approach, just using the session and then tried using cookies with the session. The system keeps me logged in for a while but then seems to lose my cookie and/or my session variables. I am using AJAX enabled pages so there are both postbacks and callbacks. I think it is an IIS setting on the web server that is causing the problem!
/emoticons/confused.gif

wisemx
09-28-2008, 04:36 AM
Hi,
Contact Support, from your Control Panel, let them know what's going on.
Also mention which Web you're site is on...It's listed in your account info.
Salute,
Mark

aabragan
09-28-2008, 04:54 AM
Created a ticket for this issue. Will see where it leads...do you have any ideas why this may be happening?

aabragan
09-28-2008, 06:38 AM
I got a response back on my ticket. I wanted to make it available so that anyone else who has this problem can use it. Essentially, they are saying that we have to store all asp.net state information to our sql server database.

Here's the response:

DiscountASP.NET said...

We host each account in its unique application pool / process. To conserve memory, we recycle the application if any of the following condition is met

1) More than 20 minutes of idle time (no http request in 20 minutes)
2) The application uses more than 100MB memory
3) The application uses more than 75% of CPU time

By default, the session information is stored in memory and recycling the application will also destroy the session variables.

We suggest that you go ahead and look into session state. Please view 'http://kb.discountasp.net/article.aspx?id=10350' on this issue.


I am implementing this right now and will post my findings.

Hope this helps

aabragan
09-29-2008, 05:20 AM
My solution for the logout problem

1. Added the following line to my web.config in the system.web section:
[quote]
<sessionStatemode='SQLServer'
allowCustomSqlDatabase='true'
sqlConnectionString='DataSource=<servername>;InitialCatalog=<databasename>;PersistSecurityInfo=True;UserID=<username>;Password=<password>'
cookieless='UseCookies'
timeout='60'
regenerateExpiredSessionId='true'/>
</CODE>

2. Backed up my live database from the discountasp.net server
3. Restored the database locally
4. Ran the following command from the command prompt:
[quote]
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspn et_regsql.exe-S<servername>-E-d<databasename>-ssadd-sstypec
</CODE>
5. Backed up my locally modified database
6. Restored the database with the same name on the discountasp.net server
7. Made sure the application connects properly

I am still testing but it all seems to work a little better now.

Hope his helps kith...and anyone else who needs this

Aniket

kithkanan
09-29-2008, 08:32 AM
Hi Aniket,

Thank you so much for putting much time and trying to solve this issue. I think we really have the same problem. I am using AJAX enabled pages as well.
May I know what are the purpose of the commands you gave? I want to fully understand this issue. I'm running processes simultaneously every time interval. I really need help here. I am not good in this stuff.

Thanks!

Kith

aabragan
09-29-2008, 12:04 PM
The first piece of code sets up the connection information in your application for the session state so that it can use sql server
The second piece of code registers your database to store session state information when a user logs in.

Good luck

Aniket