Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 28th, 2008, 07:25 AM
Authorized User
Points: 308, Level: 6
Points: 308, Level: 6 Points: 308, Level: 6 Points: 308, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: Kolkata, West Bengal, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default SessionState timeout=60 -- Not working!!!

Hello all,

I am facing a problem with session timeout. I have increased the default Session timeout value to 60, but session is expiring after 20 minutes. How can I increase time?

My web.config file -
<sessionState timeout="60" mode="InProc" cookieless="false" />

Thank you in advance.
Angshujit



__________________
Angshujit
  #2 (permalink)  
Old February 28th, 2008, 10:48 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What evidence suggests that it is the session that is timing out? Is it possible it is something else that's timing out (cookies, authentication)?

-Peter
peterlanoie.blog
  #3 (permalink)  
Old February 29th, 2008, 02:50 AM
Authorized User
Points: 308, Level: 6
Points: 308, Level: 6 Points: 308, Level: 6 Points: 308, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: Kolkata, West Bengal, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
In the time of log in, I am storing the member id in a session variable. In other pages I am checking the session variable. If the session variable is not null then the page will open otherwise it will redirect to the login page.

When I am running the web site, system redirecting me to the login page very often. I cannot undarstand why it is happenning.

Angshujit

  #4 (permalink)  
Old February 29th, 2008, 01:34 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

On what environment are you running this site? Your development computer?

Could you possibly add some code to the session end handler in the app to write a record to a database do you can verify that the session is ending and that it's not something else.

I have had various problems with ASP.NET session over the years. I remember early on that the ASP.NET process would automatically recycle itself every so often. This resulted in strange session behavior similar to what you are experiencing. I haven't had this problem more recently as I haven't relied on session as much, or I have to switched to using SQL server session state which seems to be much less susceptible (if not impervious to) this weird behavior because the data is in a much more persistent medium. Even if the web app recycles itself, the client session cookie is still there and the data is still present within SQL.

-Peter
peterlanoie.blog
  #5 (permalink)  
Old March 3rd, 2008, 04:23 AM
Authorized User
Points: 308, Level: 6
Points: 308, Level: 6 Points: 308, Level: 6 Points: 308, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: Kolkata, West Bengal, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I am facing the problem on my development cumputer and online as well. I have verified that this is happenning due to session ending.

I am facing the same problem in one more application. Could you please give me any suggestion to overcome this problem?

Angshujit



Similar Threads
Thread Thread Starter Forum Replies Last Post
Provide Searching from more than 60 tables snowbydave1 PHP How-To 1 June 30th, 2008 02:28 PM
Sessionstate jgrant ASP.NET 2.0 Basics 1 August 26th, 2007 01:36 PM
Unrecognized configuration section 'sessionState' Shihanshin BOOK: ASP.NET Website Programming Problem-Design-Solution 1 May 27th, 2005 05:30 PM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM
Controls New Class Library project page 60??? Ghistos BOOK: ASP.NET Website Programming Problem-Design-Solution 5 July 27th, 2004 10:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.