Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Losing Values Between Pages

Status
Not open for further replies.

apc2003

Programmer
Aug 29, 2003
54
GB
I am having trouble with a ASP.net application with multiple pages.

If a value (eg a String) is assigned to Session["Test"] on page one and then in page two is used to set a lable.text the Session["Test"] seems to have forgotten what it was holding.

Putting a try catch around it reveals the error message:
"Object not set to a instance of a reference".

The really confusing thing is that this example will work on the same server access via the localhost call on our network but fails everytime when accessed via the internet calling the sample IIS server via our website domain.

Can anyone suggest some reason to why this is happening? Could it be an IIS configuration fault?

Regards in advance...
 
How many processors are in the server your using, and how many servers host the site? Perhaps you may need out-of-process session state management.
 
OK. I now no why the Session was losing the values. It is to do with the privacy settings of the browser.

It was set to block third party cookies.

How do I make my site run and use 1st class cookies so the browser wont complain?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top