Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > httpModule for Unhandled Exceptions

Thread Tools

httpModule for Unhandled Exceptions

Posts: n/a
I am writing an httpModule for unhandled exceptions.
I want to log what application the error occured in.
Normally in 1.x I would do this by getting the AssemblyName associated with
the executing assembly.

In 2.0 this comes up as app_web_x213
which is not real helpful. This is probably the dll that 2.0
compiled the page to.

What's the best way to figure out the name of the app that had the exception?

Reply With Quote
Walter Wang [MSFT]
Posts: n/a
Hi Chuck,

ASP.NET 2.0 introduced new compilation model which creates separate
assemblies for the contents of the App_Code directory as well as the
global.asax file (if present), and then compiles all of the .aspx files in
each directory into a separate assembly. (If pages in the same directory
are authored in different languages or if they have dependencies on each
other through an @ Reference directive, they could also end up in separate
assemblies.) User controls and Master Pages are also typically compiled
independently from .aspx pages. It is also possible to configure the
App_Code directory to create multiple assemblies if, for example, you
wanted to include both Visual Basic? and C# source code in a project.

You will have two options to make your logging functionality has meaningful
AssemblyName as you did in 1.1:

1) Use Web Deployment Project add-on
( This will compile
and merge your Web Site into a single assembly.

2) Use Web Application Project add-on (available in VS2005 SP1 or download
standalone from This will use the same
model as in 1.1 for web project.

Hope this helps.

Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

Get notification to my posts through email? Please refer to
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at

This posting is provided "AS IS" with no warranties, and confers no rights.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
an unhandled win32 exception was unhandled occurred in inetinfo.exe Warren Tang ASP .Net 1 09-23-2008 03:01 PM
How do I catch unhandled exceptions Alan Silver ASP .Net 5 03-23-2006 08:51 PM
Unhandled Exceptions thrown Winista ASP .Net 0 03-22-2006 08:02 PM
Unhandled Exceptions - ASP.Net ASP .Net 1 03-07-2006 10:41 PM
Unhandled Exceptions & Framesets terry ASP .Net 5 07-03-2003 04:20 PM