Solved

Application_Error not firing

Posted on 2004-10-06
20
1,310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

739 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