Last post Jun 27, 2005 04:24 PM by Christopher Bowen
Sep 21, 2004 03:55 PM|j_gaylord|LINK
Jun 27, 2005 04:24 PM|Christopher Bowen|LINK
Well, this post has certainly waited a long time for an answer. I'd just like to post a reply to hopefully make it useful if somebody else finds it. I'm sure you've found answers on your since September! :)
1) This isn't supported out-of-the-box, but the good news is you can very easily create your own. What you do in a custom publisher is limited only by .NET itself - you could log to a common file, database, WMI, etc. In fact, there are plenty of articles
out there on how to create custom publishers. Check out http://aspnet.4guysfromrolla.com/articles/032404-1.aspx, http://builder.com.com/5100-6374-5110833.html and
2) Absolutely. Any .NET application can use this block, just use the app.config instead of web.config.
3) See #1, but also yes, you can easily configure multiple blocks to respond to the same exception. Just enable both blocks in your config file and ensure they both include the exception type you wish to log (e.g. System.Data.DataException).
4) This is actually the default behavior in the EMAB. If no other publishers succeed, the EMAB resorts to logging the exception with the default (event log) publisher. You will also see event log entries describing any custom publisher failures. Because
relying on this behavior will lead to extra entries in your event log, in your case from the failing DB publisher, you could make your custom DB publisher have the "smarts" to know the DB is offline and log to the event log (instead of throwing an exception.)