Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How do I set the timeout on IIS7 ASP.NET 2.0?

Reply
Thread Tools

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

 
 
David Thielen
Guest
Posts: n/a
 
      09-24-2008
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@(E-Mail Removed)
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      09-24-2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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@(E-Mail Removed)
> Windward Reports -- http://www.WindwardReports.com
> me -- http://dave.thielen.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm


 
Reply With Quote
 
 
 
 
SAL
Guest
Posts: n/a
 
      09-24-2008
<sessionState timeout="120" />



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

"David Thielen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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@(E-Mail Removed)
> Windward Reports -- http://www.WindwardReports.com
> me -- http://dave.thielen.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm



 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      09-24-2008
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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@(E-Mail Removed)
> > Windward Reports -- http://www.WindwardReports.com
> > me -- http://dave.thielen.com
> >
> > Cubicle Wars - http://www.windwardreports.com/film.htm

>
>
>

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      09-25-2008
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)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>> 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@(E-Mail Removed)
>> Windward Reports -- http://www.WindwardReports.com
>> me -- http://dave.thielen.com
>>
>> Cubicle Wars - http://www.windwardreports.com/film.htm

>



 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      09-26-2008
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" <(E-Mail Removed)> wrote in message
news:O$(E-Mail Removed)...
> 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)" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>>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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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@(E-Mail Removed)
>>> Windward Reports -- http://www.WindwardReports.com
>>> me -- http://dave.thielen.com
>>>
>>> Cubicle Wars - http://www.windwardreports.com/film.htm

>>

>
>


 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      09-26-2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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@(E-Mail Removed)
>> > Windward Reports -- http://www.WindwardReports.com
>> > me -- http://dave.thielen.com
>> >
>> > Cubicle Wars - http://www.windwardreports.com/film.htm

>>
>>
>>


 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      09-26-2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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@(E-Mail Removed)
>> > Windward Reports -- http://www.WindwardReports.com
>> > me -- http://dave.thielen.com
>> >
>> > Cubicle Wars - http://www.windwardreports.com/film.htm

>>
>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Problem displaying binary (pdf) content in IIS7 Brad ASP .Net 14 06-08-2007 08:05 AM
VS2005, AJAX and IIS7 Pipeline Modes =?Utf-8?B?RGF2aWQgUHJlbnRpY2U=?= ASP .Net 3 12-20-2006 10:46 AM
Vista IIS7 worker process crashing from crystal reports export in asp.net Brad ASP .Net 3 12-18-2006 08:27 AM
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM



Advertisments