Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 November 7th, 2003, 11:19 AM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session Problem

Hi
I have a session variable "sUser"
On Page_Load on Page1 i give a value for sUser like this

Session("sUser")="User1"

When i go to Page2 from Page1 this code works fine:
Response.Write(Session("sUser")

But when i go to Page3 from Page2 code above does not work fine.
I always get "" for Session("sUser")
How can i solve this problem
Thanks, Alex
 
Old November 8th, 2003, 02:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

check the Timeout for ur Session.

Always:),
Hovik Melkomian.
 
Old November 9th, 2003, 12:51 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

In addition to the Timeout mentioned by Melvik, is Page3 within the same application as Page1 and 2? Sessions are available withing a specific application only. If Page3 resides in a different Virtual Directory / Application, it can not read Sessions created in another application.

If all three pages are in the same folder or application, I suggest you post some code. Maybe something else is going wrong.

Cheers,

Imar




---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Out Problem kasipandian J2EE 3 March 21st, 2008 03:35 PM
session problem MunishBhatia ASP.NET 2.0 Professional 9 October 6th, 2007 04:06 AM
Session problem abdulweb General .NET 3 August 27th, 2007 08:01 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM





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