ExceptionManagement Application Block

G

George Durzi

I'm trying to extend the ExceptionManager Application Block and build a
custom publisher that writes my exceptions to the database. That's easy
part. The difficulty I am having is in configuring my web application to use
the custom publishers.

Things to note. I have a reference to
Microsoft.ApplicationBlocks.ExceptionManager in my web application
The Microsoft.ApplicationBlocks.ExceptionManager is in my GAC, so there is
no dll for it in my webapp\bin\debug or release

I added this section at the top of my web.config file. At this time, I
haven't even included my custom database publisher, I just want to make sure
this is configured correctly.

<configSections>
<section name="exceptionManagement"
type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectio
nHandler,Microsoft.ApplicationBlocks.ExceptionManagement" />
</configSections>
<exceptionManagement>
<publisher mode="on"
assembly="Microsoft.ApplicationBlocks.ExceptionManagement"
type="Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher" />
</exceptionManagement>

In my code, I have a web page which is throwing an exception, before it
throws it, I am calling the ExceptionManager to publish the exception..

ExceptionManager.Publish(ex);

According to the default behavior of the ExceptionManager, the exception is
being writting into my event log properly.

However, I am getting ANOTHER exception, thrown by the ExceptionManager
itself. I've pasted this exception below. Notice that it's not finding the
file
file:///c:/inetpub/wwwroot/lrwintranet/bin/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
because it's not there, it's in the Global Assembly Cache!!

How can I configure this to know that my Dlls for the ExceptionManager are
in the GAC?


Event Type: Error
Event Source: ExceptionManagerInternalException
Event Category: None
Event ID: 0
Date: 5/27/2004
Time: 11:22:48 AM
User: N/A
Computer: GDURZI-XP
Description:


1) Exception Information
*********************************************
Exception Type: System.Configuration.ConfigurationException
Message: Exception creating section handler.
(c:\inetpub\wwwroot\lrwintranet\web.config line 4)
BareMessage: Exception creating section handler.
Filename: c:\inetpub\wwwroot\lrwintranet\web.config
Line: 4
TargetSite: System.Configuration.IConfigurationSectionHandler
GetFactory(System.String)
HelpLink: NULL
Source: System.Web

StackTrace Information
*********************************************
at System.Web.Configuration.HttpConfigurationRecord.GetFactory(String
configKey)
at System.Web.Configuration.HttpConfigurationRecord.Evaluate(String
configKey, SectionRecord section)
at System.Web.Configuration.HttpConfigurationRecord.GetConfig(String
configKey, Boolean cacheResult)
at System.Web.Configuration.HttpConfigurationRecord.GetConfig(String
configKey, Boolean cacheResult)
at System.Web.Configuration.HttpConfigurationRecord.GetConfig(String
configKey, Boolean cacheResult)
at System.Web.HttpContext.GetConfig(String name)
at
System.Web.Configuration.HttpConfigurationSystemBase.System.Configuration.IC
onfigurationSystem.GetConfig(String configKey)
at System.Configuration.ConfigurationSettings.GetConfig(String
sectionName)
at
Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(Exc
eption exception, NameValueCollection additionalInfo)

2) Exception Information
*********************************************
Exception Type: System.IO.FileNotFoundException
Message: File or assembly name
Microsoft.ApplicationBlocks.ExceptionManagement, or one of its dependencies,
was not found.
FileName: Microsoft.ApplicationBlocks.ExceptionManagement
FusionLog: === Pre-bind state information ===
LOG: DisplayName = Microsoft.ApplicationBlocks.ExceptionManagement
(Partial)
LOG: Appbase = file:///c:/inetpub/wwwroot/lrwintranet
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: Microsoft.ApplicationBlocks.ExceptionManagement
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/lrwintranet/2701740a/e67690c7/Microsoft.ApplicationBlocks.ExceptionMan
agement.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/lrwintranet/2701740a/e67690c7/Microsoft.ApplicationBlocks.ExceptionMan
agement/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/lrwintranet/bin/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/lrwintranet/bin/Microsoft.ApplicationBlocks.ExceptionManagement/Microsoft.ApplicationBlocks.ExceptionManagement.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/lrwintranet/2701740a/e67690c7/Microsoft.ApplicationBlocks.ExceptionMan
agement.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/lrwintranet/2701740a/e67690c7/Microsoft.ApplicationBlocks.ExceptionMan
agement/Microsoft.ApplicationBlocks.ExceptionManagement.EXE.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/lrwintranet/bin/Microsoft.ApplicationBlocks.ExceptionManagement.EXE.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/lrwintranet/bin/Microsoft.ApplicationBlocks.ExceptionManagement/Microsoft.ApplicationBlocks.ExceptionManagement.EXE.

TargetSite: System.Type GetType(System.String, Boolean)
HelpLink: NULL
Source: mscorlib

StackTrace Information
*********************************************
at System.Type.GetType(String typeName, Boolean throwOnError)
at System.Web.Configuration.HttpConfigurationRecord.GetFactory(String
configKey)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top