Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 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 January 23rd, 2005, 09:02 AM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank God I am not alone.

Running IIS 6.0, Windows Server 2003. Session variables randomnly drop out. I tried in Firefox and the same thing happened. It is definatly a server problem.

I've created a separate application pool, turned off the recylcing. Nothing.

Will keep you posted.

 
Old January 23rd, 2005, 09:24 AM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK,

Just found out that when I set the session variable on one page and print out the session I get one SessionID. When I move to the next page and do another get session ID, it returns a different value. How is this possible, I am not abandoning sessions and the timeout is 20 minutes. Is it because my old value is being deleted in between? Or is my client machine is storing multiple session variables?

I have refreshed and used the back button a couple of times and seen old session variables be returned that had been created previously, but should have been superceeded by later versions.

Very odd behaviour!! And incrediably frustrating when trying to explain what is happening to my boss.

 
Old January 23rd, 2005, 09:41 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Does your browser / system allow cookies?

Usually, when you get a new Session ID on each request, it means that the browser cannot receive /store the Session cookie that is required for Sessions to work.

Check your browser and security software and see if cookies are blocked.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Hate This & I'll Love You by Muse (Track 12 from the album: Showbiz) What's This?
 
Old January 24th, 2005, 12:26 AM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When ever a user comes from asp to asp.net page
(for eg a.asp redirect to b.aspx), user is loosing the session information stored in the cache(hashtable).
The hashtable is there but does not have any items in it. This happens only in production.

1. Is there a reason why session information is lost when redirected to an aspx page from an asp page?
2. Is it a known bug from Microsoft? Has anyone come across the same bug?

Please let me know if you have an idea why the session information is getting lost.

Thanks
Praveen
 
Old January 24th, 2005, 02:39 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 Praveen,

Are you expecting the ASP Session ID (and state) to be transferred to ASP.NET?

If that's the case: that's not going to be happen; each technology uses its own ID.


Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old January 24th, 2005, 09:39 PM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,
thanks for the quick reply.

No, I am not transferring the session ID from ASP to ASP.NET.

regards
Praveen

 
Old January 25th, 2005, 02:46 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Then what do you mean with:
Quote:
quote:When ever a user comes from asp to asp.net page
(for eg a.asp redirect to b.aspx),
This looks like a redirect from ASP to ASP.NET to me.

Can you describe your problem in more detail?

Imar
 
Old January 25th, 2005, 05:49 AM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

It's not the browser. The only solution I could find was a Cookie work around. I moved all the session variables (5) into a cookie and it works.

The EXACT same code works fine on our windows 2000 development server.

This is clearly a bug in 2003 Server with IIS 6.

 
Old January 26th, 2005, 05:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I wouldn't say it's a bug in 2003, but probably just a change in the design.

But it's hard to say without seeing the code you're having problems with.

Oh well, as long as it works... ;)

Cheers,

Imar
 
Old February 14th, 2005, 03:48 PM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I too was having this problem and have been having this problem for over a year now (running Windows 2003/IIS6.0). We even have an open ticket with Microsoft to figure this problem out, but you can only tell Microsoft so many times that it is not a problem with the code before becoming extremely frustrated. Today however I have found a solution that works for me and allows me to get my session variables back, and use them with some reassurance and consistancy.

My site was setup to use the DefaultAppPool in IIS, so I moved it to its own app pool (web site properties/Home Directory/Application Pool), and set the recycle worker processes to only recycle at 00:00, with no other recycle options checked.

And presto no more session variable losses. I then moved another site on our server that was having the same troubles over to my app pool, and her site started working properly again as well. For the record our Default App Pool probably had over 100 sites using it, so it is easy to see why the processes were getting recycled so often.

I hope this helps others, because I feel your pain!

Good Luck
Ron

Carbon Communities
http://www.carboncommunities.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Variables Randomly Disappeared Dmitriy .NET Framework 1.x 1 November 30th, 2006 01:24 AM
Session Variables in C# shikha09 C# 1 November 28th, 2006 10:38 AM
Session Variables Randomly Disappeared Dmitriy General .NET 0 November 20th, 2006 08:42 AM
Is it possible for me using session variables into see07 ASP.NET 1.x and 2.0 Application Design 4 March 9th, 2005 07:46 PM
session variables help face Classic ASP Databases 4 September 12th, 2003 03:57 PM





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