MiniDumpWriteDump shouldn’t really be called from the crashing process, much less from the crashing thread (think about “stack” and guard pages). Also, in the managed world, to be able to use sos on the dump, the dump is not really going to be “mini” any more.
In addition to the AppDomain.UnhandledException event, the System.Windows.Forms.Application.ThreadException should be subscribed to, to hook unhandled exceptions from the message loop.
There is no good Windows Error Reporting story for .NET. Also, WER/OCA is useful only for signed binaries. Everything else just goes down the big drain in Redmond. (Verisign signed, BTW. I can’t believe where all in the world these guys keep their hands wide open.)
Crash dump and logfile privacy is a huge issue. Think “compliance”. SOX or FDA, or whatnot. Also, all your clients may not have a persistent, cheap internet connection ready for you to send out e-mail or tons of data.
There are many good logging frameworks, beyond or in connection with EnterpriseLibrary, mostly adding value by great aggregation and analysis tools e.g. SmartInspect.
Lastly, not too many people know Microsoft’s kernel-based, high-performance “Event Tracing for Windows” (ETW) for drivers and applications, although it’s a hot runner-up for “Greatest Thing Since Sliced Bread” because it allows to decouple trace source and trace sink and is claimed to process a log entry in “only 1500-2000 cycles, depending on settings”. So they are long finished when EntLib hasn’t even yet figured out which LogSink factory to invoke.
There is a managed ETW wrapper in .NET 3.5, but only for Vista and it didn’t get a lot of love from it’s developers, it feels.
Hmm. I got off topic.
We have, for our Windows apps, a dialog that reads “We apologize for the inconvenience.” and allows to save some error information in the user’s local application data folder for support personnel (all exception infos, dump, screenshot). It’s the least we can do.
But in the end, users will dismiss the dialog as fast as anything else they deem usual software noise.