By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

Global Var

P: n/a
Hi Gang,

I need to persist error info between the Application_Error block in
Global.asax and the custom error page. I am trying to use the built-in
Application class. I am writing this code in the Application_Error block:

Application["errInfo"] = info;

When I try to access the "errInfo" object in Application, I get nothing.
Here is the code in Error.aspx:

info = (string)Application["errInfo"];

I can use the Application class in other parts of my project but it does not
seem to work when I use it in the Application_Error block. Thanks for any


ps: any other ideas about how to get the info into Error.aspx?

May 30 '07 #1
Share this Question
Share on Google+
2 Replies

P: n/a
More info: the exception that the tests were based on was raised in
Global.asax. I got the idea to try throwing an exception in a page and when
I did, the code worked as designed. So it looks like exceptions originating
in Global.asax cause this kind of issue.
May 30 '07 #2

P: n/a
"Uriah Piddle" <st*************@msn.comwrote in message
ps: any other ideas about how to get the info into Error.aspx?
You don't actually need to:

Exception ex = Server.GetLastError();

May 30 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.