473,395 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Session Timeout

Jim
The dreaded Session state :-)

All, Just to give a little background this is reagarding an ASP 3.0
application running on IIS6 using the default app pool.

I have set the session timeout to 540 minutes in IIS (under options tab in
Application configuration). There is no code in the Session_OnStart or
Session_OnEnd in the global.asa. Via an include file, each page executes
these no-cache related code:
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.CacheControl = "private"

Sorry, just wanted to give some background on what we're dealing with.
Anyways, the problem is that the users are saying their session state is
expiring much sooner than 540 minutes. How is this possible? What did I miss?
Are there better techniques to ensure the 540 minute session?

Thanks in advance,
Jim
Jul 22 '05 #1
12 6367
Setting a session timeout any higher than 90 minutes is somewhat iffy.
You should perhaps consider using cookies to keep track of them longer than
that.

It really all depends on why you are even doing this in the 1st place
though.

"Jim" <Ji*@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
The dreaded Session state :-)

All, Just to give a little background this is reagarding an ASP 3.0
application running on IIS6 using the default app pool.

I have set the session timeout to 540 minutes in IIS (under options tab in
Application configuration). There is no code in the Session_OnStart or
Session_OnEnd in the global.asa. Via an include file, each page executes
these no-cache related code:
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.CacheControl = "private"

Sorry, just wanted to give some background on what we're dealing with.
Anyways, the problem is that the users are saying their session state is
expiring much sooner than 540 minutes. How is this possible? What did I
miss?
Are there better techniques to ensure the 540 minute session?

Thanks in advance,
Jim

Jul 22 '05 #2
Jim
I see. The only reason why the session state is set so high is the users do
not want to be exited from the application during the day. When session
timesout, the app forces the user to exit.

"Kyle Peterson" wrote:
Setting a session timeout any higher than 90 minutes is somewhat iffy.
You should perhaps consider using cookies to keep track of them longer than
that.

It really all depends on why you are even doing this in the 1st place
though.

"Jim" <Ji*@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.com...
The dreaded Session state :-)

All, Just to give a little background this is reagarding an ASP 3.0
application running on IIS6 using the default app pool.

I have set the session timeout to 540 minutes in IIS (under options tab in
Application configuration). There is no code in the Session_OnStart or
Session_OnEnd in the global.asa. Via an include file, each page executes
these no-cache related code:
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.CacheControl = "private"

Sorry, just wanted to give some background on what we're dealing with.
Anyways, the problem is that the users are saying their session state is
expiring much sooner than 540 minutes. How is this possible? What did I
miss?
Are there better techniques to ensure the 540 minute session?

Thanks in advance,
Jim


Jul 22 '05 #3
Jim wrote:
I see. The only reason why the session state is set so high is the
users do not want to be exited from the application during the day.
When session timesout, the app forces the user to exit.

Which is a good thing, as far as the server is concerned. Sessions consume
system resources. There are other ways to preserve state when it needs to be
preserved for that amount of time. Cookies, databases, files, etc.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #4

Jim,

We're experiencing timeouts like the one you describe. The timeout i
IIS6 is set to 20 minutes, but some of our users say they are "logge
out" after approximately 4 minutes. Our debugging code confirms tha
their session has disappeared.

Did you find a resolution to this issue?

Bria
-
bes725
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Jul 22 '05 #5
Jim
Well no. I solution was to reduce the timeout from 8 hours to 90 minutes.
Wow, I'm not sure what could be causing your session timeout problem of
timing out after just four minutes.

"bes7252" wrote:

Jim,

We're experiencing timeouts like the one you describe. The timeout in
IIS6 is set to 20 minutes, but some of our users say they are "logged
out" after approximately 4 minutes. Our debugging code confirms that
their session has disappeared.

Did you find a resolution to this issue?

Brian

--
bes7252
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 22 '05 #6

bes7252 wrote:
*Jim,

We're experiencing timeouts like the one you describe. The timeout in
IIS6 is set to 20 minutes, but some of our users say they are "logged
out" after approximately 4 minutes. Our debugging code confirms that
their session has disappeared.

Did you find a resolution to this issue?

Brian *


--
redsun
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 22 '05 #7
Good Day,

I'm experiencing the same problem and need a solution not a work arround.
Implementing a different state management system in our production
environment is not a option. Since this will mean retesting and redepolying
our application to 10 sites world wide.

This worked fine on IIS 5.0 so why is it not working on IIS 6.0. What was
changed. And how do we change it back.

Thanks
Jaco Roux

"Bob Barrows [MVP]" wrote:
Jim wrote:
I see. The only reason why the session state is set so high is the
users do not want to be exited from the application during the day.
When session timesout, the app forces the user to exit.

Which is a good thing, as far as the server is concerned. Sessions consume
system resources. There are other ways to preserve state when it needs to be
preserved for that amount of time. Cookies, databases, files, etc.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Jun 13 '06 #8
jaco wrote:
Jim wrote:
I see. The only reason why the session state is set so high is the
users do not want to be exited from the application during the day.
When session timesout, the app forces the user to exit.
Good Day,

I'm experiencing the same problem
The text you quoted does not mention a problem and I no longer have the
original thread on my machine.

What is the problem? Or the symptoms of the problem if you haven't
identified the problem?
and need a solution not a work
arround. Implementing a different state management system in our
production environment is not a option. Since this will mean
retesting and redepolying our application to 10 sites world wide.

This worked fine on IIS 5.0 so why is it not working on IIS 6.0.
What was working fine on IIS5 but is no longer working on IIS6?
What was changed. And how do we change it back.

Not sure. Lots of things changed. Have you been to the MS website and
read the "What's New" document for IIS6? Try this:
http://www.microsoft.com/windowsserv...s/default.mspx
or this:
http://msdn.microsoft.com/library/en...13fc08aa92.asp

There's also this dandy Support Center:
http://support.microsoft.com/default...is60&x=15&y=13

as well as the www.iisfaq.com site.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jun 13 '06 #9
Hi Bob,

We are currently storing about 30 user profile settings as session variables
in a asp site.

Since moving to Windows 2003 R2 with IIS6.0 we are experiencing unexpected
session timeouts. The session timeout interval is set to 480 minutes or 8
hours. Our users are however complaining that they are experiencing timeouts
more randomly and over much shorter intervals.

Users have to log in again when their session is timed out.

Implementing a new Session State Management Sub System using cookies and/or
files and/or SQL DB is not an option purely due to the cost in retesting and
redistributing the site.

So the question remains. Why are sessions timing out prematurely?

Thanks
Jaco Roux

Jun 13 '06 #10
jaco wrote:
Hi Bob,

We are currently storing about 30 user profile settings as session
variables in a asp site.
What are you storing? Strings? Arrays? COM objects?

Since moving to Windows 2003 R2 with IIS6.0 we are experiencing
unexpected session timeouts. The session timeout interval is set to
480 minutes or 8 hours. Our users are however complaining that they
are experiencing timeouts more randomly and over much shorter
intervals.

Users have to log in again when their session is timed out.

Implementing a new Session State Management Sub System using cookies
and/or files and/or SQL DB is not an option purely due to the cost in
retesting and redistributing the site.

So the question remains. Why are sessions timing out prematurely?


Sorry, I don't know. You should try posting to the .inetserver.iis
group.

We'd appreciate if you would post whatever solution you find here.

....

I just did a google search and came up with
http://blogs.msdn.com/david.wang/arc...e_on_IIS6.aspx
http://support.microsoft.com/default.aspx/kb/233477
http://groups.google.com/groups?hl=e...20&sa=N&tab=wg

Do any of these help?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jun 13 '06 #11
Strings only

"Bob Barrows [MVP]" wrote:
jaco wrote:
Hi Bob,

We are currently storing about 30 user profile settings as session
variables in a asp site.


What are you storing? Strings? Arrays? COM objects?

Since moving to Windows 2003 R2 with IIS6.0 we are experiencing
unexpected session timeouts. The session timeout interval is set to
480 minutes or 8 hours. Our users are however complaining that they
are experiencing timeouts more randomly and over much shorter
intervals.

Users have to log in again when their session is timed out.

Implementing a new Session State Management Sub System using cookies
and/or files and/or SQL DB is not an option purely due to the cost in
retesting and redistributing the site.

So the question remains. Why are sessions timing out prematurely?


Sorry, I don't know. You should try posting to the .inetserver.iis
group.

We'd appreciate if you would post whatever solution you find here.

....

I just did a google search and came up with
http://blogs.msdn.com/david.wang/arc...e_on_IIS6.aspx
http://support.microsoft.com/default.aspx/kb/233477
http://groups.google.com/groups?hl=e...20&sa=N&tab=wg

Do any of these help?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jun 13 '06 #12
We had similar problems after moving to Windows 2003 and IIS 6 as well. In our case, the culprit turned out to be the "Idle timeout" setting for the "Worker Process" "Application Pool."

The default value for the "idle timout" is 20 minutes. So if there are no hits to any web pages in any web application on any web sites in the shared application pool within 20 minutes, the worker process of the application pool will re-start, therby ending all active sessions of all web pages, web applications and web sites running in that application pool.

Our solution was to disable the "idle timeout" and institute a daily restart of the worker process every night.

Here's a link for "Configuring Worker Processes for Idle Timeout (IIS 6.0)":
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/83b35271-c93c-49f4-b923-7fdca6fae1cf.mspx?mfr=true

Good luck! :)
Aramazd
Jul 11 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
8
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
5
by: Just D. | last post by:
Do we have any access to the Session object from a different Session? The idea is to save Session of a current user and then if he logs in again then return the Session back. It's not a problem to...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
6
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.