Session Variables lost on Window 2003 Server

A

albertcliang

I've got an odd case where I'm developing on a Win2k box and everything
works fine (no, that's not the odd part).

However, when I publish my code to a test box (2k3 Server, single
processor), I will lose my session variables after a random number of
server.transfers from one page to another. Sometimes a page can access
the session variables and sometimes it can't. There are no underscores
or weird characters in the server name (aside from a hyphen).

Another weird part is that if I use localhost as the path, I DON'T lose
the session variables. Anyone have any advice on what to do?
 
A

albertcliang

Okay, forget the part about localhost working. It's forgetting the
session variables too.
 
A

Alvin Bruney [MVP]

Session loss is typical after app pool recycling. You need to eliminate this
as the source of the problem first by viewing the application event logs for
the application.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
D

Dakhath

On two different XP Pro systems, works fine. Same code on this 2003
Server doesn't work. I lose the session values randomly. The
Session.SessionID is retained throughout though, which is weird. I
checked and I'm not overwriting them anywhere either. Checked the logs
and there's no indication of the app pool reseting.
 
A

Alvin Bruney [MVP]

Interesting. Wire up your session_end event and dump the stack trace to a
log or flat file. Read the file to find out any clues as to what triggered
the reset.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
D

Dakhath

Turns out this may be due to a bad IIS install by IT. Tried the same
code on a different Win 2k3 box and everything works fine. Similarly,
tried the working production code on the server in question and it
suddenly starts dropping session variables at random. I'm going to
nuke/reinstall the box and see if that addresses it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top