Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

WCF: Generic unhandled exception logging

 
 
Thread Tools Display Modes
Old 06-05-2007   #1 (permalink)
ronscottlangham@yahoo.com
Guest


 

WCF: Generic unhandled exception logging

I am writing a WCF web service hosted under IIS and have several
interfaces and numerous methods. I need to log any unhandled
exceptions that occur on the server side. I could go and put an
exception handler around every method and do the log, but prefer to
have some type of generic event or process messaging that would occur
for any unhandled exceptions and log them.

In ASP.NET web application, you have the Application_Error event. In
ASP.NET Web Services, you could write a SoapExtension and be in the
pipeline for all messages and log any exceptions that occur. I am
thinking that SoapExtension will not work for WCF services, anyone
know?

Any other suggestions on how to provide this functionality?

Thanks

Old 06-05-2007   #2 (permalink)
Marc Gravell
Guest


 

Re: Generic unhandled exception logging

You can provide an IErrorHandler implementation, implementing
ProvideFault() and HandleError(). Personally, I use a custom behaviour
to register my error-handler against the ChannelDispatcher.

That should be enough for google to fill in the gaps ;-p

e.g.
http://www.extremeexperts.com/Net/Ar...lingInWCF.aspx

Marc


Old 06-05-2007   #3 (permalink)
ronscottlangham@yahoo.com
Guest


 

Re: Generic unhandled exception logging

On Jun 5, 9:06 am, "Marc Gravell" <marc.grav...@gmail.com> wrote:
> You can provide an IErrorHandler implementation, implementing
> ProvideFault() and HandleError(). Personally, I use a custom behaviour
> to register my error-handler against the ChannelDispatcher.
>
> That should be enough for google to fill in the gaps ;-p
>
> e.g.http://www.extremeexperts.com/Net/Ar...lingInWCF.aspx
>
> Marc


cool, looks like what I need, figured WCF had some type of support for
this.

Thanks!!

 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unhandled Exception in Console Application AG .NET General 10 04-10-2008 09:20 AM
Custom Exception Handling And Logging using EnterPrise Library app Shrikant More .NET General 0 03-31-2008 12:08 AM
How catch unhandled Exception in WPF Project Horst Klein Avalon 6 08-17-2007 10:06 AM
Unhandled exception at 0x779447f2 in explorer.exe: 0xC00000FD: Stack overflow. Eigil Krogh Vista General 2 06-22-2007 01:23 PM
Unhandled exception 0xC0000005 in migcore.dll when upgrading to Vi Super_Leandro Vista General 0 04-30-2007 10:12 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50