Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 September 29th, 2006, 03:10 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default Set different Timeouts for Different Sessions

Hi,
In my project I need to set different timeouts for different Sessions.
For example, Timeout for Session("MemberID") = 45 mins and Timeout for Session("CartID") = 100 mins.
Is this possible in an ASP.NET application?

Savan
__________________
Savan
 
Old September 29th, 2006, 06:47 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi

No that's not possible. You can control the session time for the entire application via web.config file.

Regards
Mike
 
Old October 7th, 2006, 06:22 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

Isn't there any other option I can do this??

Savan
 
Old October 7th, 2006, 11:46 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

No. Your session timeout is application wide. I assume what you have is an E-Comm website and you want to presist the shopping cart (I am guessing based on what you call your session variables)

Here is the thing, say this was possible, and my memberID timed out how would you still be able to relate my Session("CartID") back to me?? How would you know what Session("CartID") belonged to me? I don't think you could do this 100% accurately without a database behind the application or presisting a cookie but, if you already go that route to store the information in a cookie or dbase having 2 different session timeouts is a moot point.

Presist your cart via a cookie, database, or session. (I would suggest database since you obviously want to presist a users cart longer then their session)

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
XPath: set operation with a disjoint node set rich_unger XSLT 7 May 6th, 2008 09:24 AM
How to handle session timeouts? prankur ASP.NET 1.0 and 1.1 Basics 1 January 13th, 2006 02:52 PM
How to set up php.ini for sessions club662 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 June 28th, 2005 12:35 PM
Mixing classic ASP sessions with ASP.NET sessions scorpion_king General .NET 2 August 4th, 2004 08:20 AM
Help sessions ittorget Pro VB 6 2 April 20th, 2004 02:18 AM





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