Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP 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
 
Old March 16th, 2010, 08:38 AM
Registered User
 
Join Date: Mar 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session state

I am new to ASP (2 wks) and i have a requirement to have sessions expire after a period of inactivity, not since log on. This is on a company intranet , we have ppl that will be working all day long using the site and they end up getting kicked out many times in the day. Other than making session time out 10+ hours how can i do this?

Thanks
 
Old March 16th, 2010, 09:05 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Session.Timeout

This setting controls how long, in minutes, a user's session will last. While it is wise to keep this value short for efficiency's sake, there are cases where that's just not enough time for users to get things done in your application (for example, if you have a client-side tool where the user is changing properties but not making requests to the server until they are done). The default is 20 minutes, and once 20 minutes of inactivity has occured, the session expires and all session variables are lost. You can increase the session timeout in an ASP page or in global.asa's Session_onStart() method with the following code:
Code:
<% 
    Session.Timeout = 45 
%>
To change this value for an entire application, open Internet Services Manager, go to the Home Directory tab of the application, click on configuration, and alter the Session timeout field on the "App Options" tab. This metabase setting is also exposed to ADSI.
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old March 16th, 2010, 09:12 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Other solution can be validating user with windows authentication. Please check the following article:

http://www.4guysfromrolla.com/webtech/020201-1.shtml

Using this option session can be maintained easily.



__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old March 16th, 2010, 01:26 PM
Authorized User
 
Join Date: Jan 2010
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default

One option is to keep refreshing a page at regular intervals with a timer . This way your session will always be alive.

Kushal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session State Problem? caterpillar ASP.NET 1.0 and 1.1 Basics 8 August 17th, 2006 03:08 PM
Session State|View State|Do I have other options? rockon ASP.NET 1.x and 2.0 Application Design 2 October 5th, 2005 07:10 PM
maintaining session state in C# grs General .NET 0 January 13th, 2005 03:46 AM





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