Kirk Allen Evans:
A Better ExceptionXmlPublisher for the Exception Management Application Block. This snippet incorporates part of a post from microsoft.public.dotnet.framework. It shows how to allow multiple threads to write to the same file at once, using a mutex to provide concurrency. This example is integrated with the Exception Management Block to provide a means of logging errors in multi-user applications to XML files.
I use the EMAB as well to log to a file. I need to put this mutex code in my solution -- Thanks Kirk. However, the log file in Kirk's example may not be well-formed. He is appending exceptionInfo.OuterXml to the file each time. My version: ExceptionPublisher.htm