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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session variables in Application_onError

Status
Not open for further replies.

vwhite

Programmer
Oct 4, 2001
87
0
0
AU
Hello all,

I have a procedure in Application_onError in the global.asax file that sends an email to the Administrator and then redirects to an error page.

In the email it also sends some information that has been retreived from session variables.

This used to work fine. Now it doesn't - the only thing I can think of that has changed is that we upgraded from .NET 1.1 to 2.0

This is how I am accessing the session variables
Dim ClientID as string = HttpContext.Current.Session("client_id")

And this is the error message I get
Object reference not set to an instance of an object.

Can anyone help with this problem?

Thanks




Vicky....

"I used to have a handle on life...then it broke
 
sorry mate i have to go now and I will not be back infront of a computer for a week (yeah!)

thanks for all your help....

when I get back i will keep trying to figure it out....

Vicky....

"I used to have a handle on life...then it broke
 
I am back

I am still trying to fix this issue

HttpContext.Current.Response.Write(HttpContext.Current.Session)

shows nothing

and

HttpContext.Current.Response.Write(HttpContext.Current.Session.Count & "<BR>")

gives the
Object reference not set to an instance of an object.

error.

Don't know if you are still able to help at all?

cheers


Vicky....

"I used to have a handle on life...then it broke
 
i found this


which states that the session object is not available in the Application_OnAuthenticateRequest handler inside global.asax.

I wonder if it is the same for the application_onerror event?

Vicky....

"I used to have a handle on life...then it broke
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top