Application_Error not firing

Ok this is really annoying me.

I'm emailing error's that occur on my site in Application_Error.  It's worked before, even in production.  I'm bugfixing it right now on my local PC and I can't for the life of me get anything in Application_Error to fire.  (Using VS.net to debug)  I've set breakpoints, VS.net goes right over them.  On the surface, my error handling is working correctly, it even redirects me to the error page, which I've configured in web.config.

I've done all the obvious I can think of, I don't think it is a coding problem, because it has worked before.  I'm not an idiot (usually), so I don't think I'm doing something stupid (I haven't done anything!).  Restarted IIS, then restarted my computer.  I've even tried to handle page_error, and get the same results (never called).

Any ideas?
--Michael
LVL 33
raterusAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
AerosSagaCommented:
are you catching it elsewhere first raterus?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
AerosSagaCommented:
In your routines I mean
0
 
raterusAuthor Commented:
Not any of those, I found those (and others) when I tried to research this problem earlier.  It's not so much I'm not getting my email anymore, when I debug, it never hits the application error code (at least the breakpoint anyway)
0
 
raterusAuthor Commented:
nope.  Here is how I'm throwing my "test" eror

Throw New ApplicationException("Blah")

I've also caused a real error too:

Dim i as integer = 1
dim j as integer = 0
dim k as integer = i/j

0
 
raterusAuthor Commented:
Like I said, I didn't change anything, which makes me think this is more than just a coding error.
0
 
raterusAuthor Commented:
Ok, this was a weird one, but it is fixed.  You would think "Build Solution" and "Rebuild Solution" would actually rebuild all your code, but NO.  I had to go to one of my class libraries and say "Rebuild myClassLibrary"  It turns out when I threw my exception, another exception was being thrown on top of that.  Dumb VS.net!
0
 
AerosSagaCommented:
It sounds like a bug in the IDE then.  Perhaps recreating the global.asax?
0
 
raterusAuthor Commented:
first person to link to this question wins!
0
 
AerosSagaCommented:
hehe I figured;)
0
 
AerosSagaCommented:
link from where raterus?
0
 
AerosSagaCommented:
for an answer to a question you mean?
0
 
raterusAuthor Commented:
that does seem like a VS.net bug though, the class library project was actually added to my solution, I didn't just link to the .dll (naturally that wouldn't rebuild..)
0
 
raterusAuthor Commented:
yes, I can't accept your previous questions, that wouldn't be a correct answer.  So you have to link to my answer.
0
 
raterusAuthor Commented:
cool, that was exactly the problem/solution I needed Aeros!
0
 
AerosSagaCommented:
lol ;)
0
 
raterusAuthor Commented:
I hope nobody gets confused one day with my recursive answer.
0
 
AerosSagaCommented:
Well if so I'm sure you'll set em straight.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.