raterus
asked on
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
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
are you catching it elsewhere first raterus?
In your routines I mean
ASKER
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)
ASKER
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
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
ASKER
Like I said, I didn't change anything, which makes me think this is more than just a coding error.
ASKER
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!
It sounds like a bug in the IDE then. Perhaps recreating the global.asax?
ASKER
first person to link to this question wins!
hehe I figured;)
link from where raterus?
ASKER
for an answer to a question you mean?
ASKER
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..)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes, I can't accept your previous questions, that wouldn't be a correct answer. So you have to link to my answer.
ASKER
cool, that was exactly the problem/solution I needed Aeros!
lol ;)
ASKER
I hope nobody gets confused one day with my recursive answer.
Well if so I'm sure you'll set em straight.
http://forums.devshed.com/showthread.php?t=136583&goto=nextnewest
http://www.sitepoint.com/forums/archive/index.php/t-161465.html
http://discuss.develop.com/archives/wa.exe?A2=ind0312b&L=dotnet-web&T=0&F=&S=&P=255
HTH, Nauman.