Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. 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 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 December 13th, 2006, 06:25 PM
Registered User
 
Join Date: Nov 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Persistent Session State accross multiple pages

Hi,

I'm not sure if this is ASP or Server related, but here is what's happening...

I developed my site on Windows2000 server with SQLExpress, the live server is Windows2003 Server with SQLExpress. I have mirriored all the IIS settings and made everything as similar as possible. Both also have ASP.NET2.0 installed - even though I developed everything with Classic ASP.

The problem is that on the 2000 server, once a person is logged in, their session is persistent. That is, accross multiple pages, until timeout or logout occurs.

On the 2003 Server, once the user is logged on, I can return the value from the database to the same login page and set the session varible, but it does NOT persist accross multiple pages.

other notes:
-Yes, I have enabled session state in IIS
-The pages are identicle (uploaded from test server)

So, I am wondering if anyone else has had this problem, or if there is a fix or a workaround.

Thanks a bunch.


 
Old December 13th, 2006, 06:46 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

IME all you need to do is, as you have done, enable session state in IIS (along with .asp pages, includes if required etc...)

Are you trying to pass Session-based cookies or session variables? I suggest using the later, they will persist accross browsers within the same session only. Assign them like so:

sql = "SELECT ID,...,... FROM users WHERE..."
set getInfo = conn.execute(sql)
'assign the users unique ID from the query above:
session("userID") = getInfo(0)

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving control state to persistent medium nmahesh567 .NET Framework 2.0 0 June 17th, 2007 02:28 PM
Persistent Session State accross multiple pages Admiral1701 Internet Information Services 0 December 13th, 2006 06:27 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.