Solved

Application_Error not firing

Posted on 2004-10-06
20
1,305 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now