473,394 Members | 1,865 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,394 software developers and data experts.

How do I set the timeout on IIS7 ASP.NET 2.0?

Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Sep 24 '08 #1
7 3032
I don't have it in front of me, but session timeout is set in the
configuration file(s). In general, you want to do this on a site by site
basis. And you really DO NOT want to set it for 8 hours, even if that is
what you are being told. I understand that is a workday, but it also means
leaving sessions open most of the night, consuming resources, if a person
does not log out. If that is your issue, you are better to force a logout
client side when a person goes past time out and set it to a more reasonable
timeout.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"David Thielen" <th*****@nospam.nospamwrote in message
news:s7********************************@4ax.com...
Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Sep 24 '08 #2
SAL
<sessionState timeout="120" />

I set mine for 2 hours very reluctantly and only because my boss wanted it
to go up.

"David Thielen" <th*****@nospam.nospamwrote in message
news:s7********************************@4ax.com...
Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Sep 24 '08 #3
if you use sqlserver sessions, a couple of weeks (or more) is fine and I
almost never use less than 12-24 hours (only shorten for security). works
great with shopping cart apps.

just be sure to have a backup of the session database (as its now production
data, unless lost sessions are ok).

-- bruce (sqlwork.com)
"SAL" wrote:
<sessionState timeout="120" />

I set mine for 2 hours very reluctantly and only because my boss wanted it
to go up.

"David Thielen" <th*****@nospam.nospamwrote in message
news:s7********************************@4ax.com...
Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Sep 24 '08 #4
Also, there's the App Pool idle timeout to take into consideration.

Even if the session timeout is set for 8 hours, if the users don't have any activity
for the time limit set for the App Pool timeout, the application will be recycled, too.

The session timeout can also be set in the Session_Start event :

void Session_Start(Object Sender, EventArgs e)
{
Session.Timeout=1;
}


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in message
news:uJ**************@TK2MSFTNGP03.phx.gbl...
>I don't have it in front of me, but session timeout is set in the configuration file(s). In general, you want to do
this on a site by site basis. And you really DO NOT want to set it for 8 hours, even if that is what you are being
told. I understand that is a workday, but it also means leaving sessions open most of the night, consuming resources,
if a person does not log out. If that is your issue, you are better to force a logout client side when a person goes
past time out and set it to a more reasonable timeout.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"David Thielen" <th*****@nospam.nospamwrote in message news:s7********************************@4ax.com...
>Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Sep 25 '08 #5
True. And if you hit some limit in the worker process, you could end up
dumped anyway.

Unless, of course, you move to SQL Server as your session state mechanism.
It will even survive deploying new code, as long as the user does not
request during the move. Not that I recommend live hot fixes, but it can be
done. :-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:O$**************@TK2MSFTNGP06.phx.gbl...
Also, there's the App Pool idle timeout to take into consideration.

Even if the session timeout is set for 8 hours, if the users don't have
any activity
for the time limit set for the App Pool timeout, the application will be
recycled, too.

The session timeout can also be set in the Session_Start event :

void Session_Start(Object Sender, EventArgs e)
{
Session.Timeout=1;
}


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:uJ**************@TK2MSFTNGP03.phx.gbl...
>>I don't have it in front of me, but session timeout is set in the
configuration file(s). In general, you want to do this on a site by site
basis. And you really DO NOT want to set it for 8 hours, even if that is
what you are being told. I understand that is a workday, but it also means
leaving sessions open most of the night, consuming resources, if a person
does not log out. If that is your issue, you are better to force a logout
client side when a person goes past time out and set it to a more
reasonable timeout.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"David Thielen" <th*****@nospam.nospamwrote in message
news:s7********************************@4ax.com.. .
>>Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Sep 26 '08 #6
There is a trade off here, of course, that you are adding weight to your
system for persistence. I am not stating it is wrong, but the more users the
more it affects scale.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:A1**********************************@microsof t.com...
if you use sqlserver sessions, a couple of weeks (or more) is fine and I
almost never use less than 12-24 hours (only shorten for security). works
great with shopping cart apps.

just be sure to have a backup of the session database (as its now
production
data, unless lost sessions are ok).

-- bruce (sqlwork.com)
"SAL" wrote:
><sessionState timeout="120" />

I set mine for 2 hours very reluctantly and only because my boss wanted
it
to go up.

"David Thielen" <th*****@nospam.nospamwrote in message
news:s7********************************@4ax.com.. .
Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Sep 26 '08 #7
One more thing. If you have a failure on the ASPState database, is it really
wise to restore it? It seems to me that you will end up dumping current
users during the restore so someone who might come back can come back.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:A1**********************************@microsof t.com...
if you use sqlserver sessions, a couple of weeks (or more) is fine and I
almost never use less than 12-24 hours (only shorten for security). works
great with shopping cart apps.

just be sure to have a backup of the session database (as its now
production
data, unless lost sessions are ok).

-- bruce (sqlwork.com)
"SAL" wrote:
><sessionState timeout="120" />

I set mine for 2 hours very reluctantly and only because my boss wanted
it
to go up.

"David Thielen" <th*****@nospam.nospamwrote in message
news:s7********************************@4ax.com.. .
Hi;

How do I set how long until IIS 7 drops a session for an ASP.NET 2.0
web app? I want to set it for 8 hours.

thanks - dave

david@at******@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Sep 26 '08 #8

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

Similar topics

3
by: Vlad Hrybok | last post by:
Hi all, I recently installed 64 bit version of Vista hoping to make it my primary development setup. I was able to do work with IIS7 and ASP.NET 2.0/Visua Studio 2005 combo, but hit a roadblock...
3
by: Brad | last post by:
In a Vista/IIS7 asp.net app, a coded crystal report export is crashing IIS7....but it works just fine in visual studio's cassini web server. And if I create a web form and use the crystal...
14
by: Brad | last post by:
I have a .net 2.0 web application project that creates a pdf file, saves the pdf to disk (crystal reports does this part), and then my code reads the pdf file and writes it to the httpresponse ...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi, I wonder if someone could shed some light on this one for me. I have developed a web app in VS2005 with the built in server. It uses an sql database, everytihng works. I need to test it...
0
by: Erwin Moller | last post by:
Hi, I am one of those questionable people that started with Vista (Home Premium). Not because I think it is a ready/steady OS, but partly out of curiousity, and partly because I needed to work...
4
by: turnstyle | last post by:
Hi all, I seem to be having some weird problems with PHP on IIS7, and now I wonder -- is anybody here running PHP on IIS7? Thanks! -Scott
6
by: ma | last post by:
Hello, I am new to IIS and ASP.NET. I wrote my first ASP.NET and I want to deploy in to a system which has Vista Business and IIS7. I copied my files to the target computer and created a virtual...
11
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hello, I have just installed VISTA Enterprise and VS.NET 2008. When pressing F5 to debug my test ASP.NET website, IE 7 display the message "Internet Explorer cannot display the webpage". The...
6
by: =?Utf-8?B?SmFzb24gSGFydHNvZQ==?= | last post by:
I'm running IIS7(2008 Server) and SQL both 64 bit. There's a simple client side code...that just doesn't make any sense. Is there something in IIS7 that could possibly have some effect on...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.