Help! UnhandledException stuff dont work! .Net is broken (lol)

I have:
.Net Framework 1.1.4322 with all patches
Visual Studio 2003
a VB.Net Web Application

I want to set the unhandled exception page on Page_Load:

Me.ErrorPage = AppSettings("ErrorPage")

Me.Page.ErrorPage = AppSettings("ErrorPage")

OR I want to do:

Dim
currentDomainAs AppDomain = AppDomain.CurrentDomain

AddHandler currentDomain.UnhandledException,AddressOfMe.objExceptionPublisher.AppExceptionHandler

Well, when I press a button:

PrivateSub btnDoSomething_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles btnDoSomething.Click

' Do amazing something in amazing new ways!

' Oops - found error!
ThrowNew Exception("Big Problem!")

EndSub


When the exception is thrown - I get the big ugly error in IE, and my errorpage never loads, or my objExceptionPublisher.AppExceptionHandler is never called!

.Net must be busted...or what am I doing wrong?!?!?!?

Thanks for ANY help!

[2001 byte] By [GaltSalt] at [2007-12-16]
# 1

This is becouse ASP.NET does HANDLE all user exceptions.

It call Page_Error or Application_Error event handlers to allow server code to potentialy handle / log it and then render some custom page with Exception text or simply a HTTP 500 answer.

Read Q308132 for more info.

TAG at 2007-9-8 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified