Solved

Application_Error not firing

Posted on 2004-10-06
20
1,307 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:raterus
  • 10
  • 9
20 Comments
 
LVL 25

Expert Comment

by:nauman_ahmed
ID: 12237858
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12237889
are you catching it elsewhere first raterus?
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12237892
In your routines I mean
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 33

Author Comment

by:raterus
ID: 12237902
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
 
LVL 33

Author Comment

by:raterus
ID: 12237922
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
 
LVL 33

Author Comment

by:raterus
ID: 12237934
Like I said, I didn't change anything, which makes me think this is more than just a coding error.
0
 
LVL 33

Author Comment

by:raterus
ID: 12238060
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
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12238079
It sounds like a bug in the IDE then.  Perhaps recreating the global.asax?
0
 
LVL 33

Author Comment

by:raterus
ID: 12238080
first person to link to this question wins!
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12238087
hehe I figured;)
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12238103
link from where raterus?
0
 
LVL 33

Author Comment

by:raterus
ID: 12238121
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12238135
for an answer to a question you mean?
0
 
LVL 33

Author Comment

by:raterus
ID: 12238136
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
 
LVL 17

Accepted Solution

by:
AerosSaga earned 500 total points
ID: 12238142
0
 
LVL 33

Author Comment

by:raterus
ID: 12238154
yes, I can't accept your previous questions, that wouldn't be a correct answer.  So you have to link to my answer.
0
 
LVL 33

Author Comment

by:raterus
ID: 12238169
cool, that was exactly the problem/solution I needed Aeros!
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12238183
lol ;)
0
 
LVL 33

Author Comment

by:raterus
ID: 12238225
I hope nobody gets confused one day with my recursive answer.
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12238262
Well if so I'm sure you'll set em straight.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question