EventType clr20r3 exception in EventLog when installing a windows serv(hockblogs.net)
submitted by
hockman(505) 3 years, 2 months ago
Hi there,
Recently I got the following error when starting a windows service that was calling a cross domain webservice:
EventType clr20r3, P1 kidyevwoifqwsnnsswwfxf5wpma0nhqc, P2 1.0.0.0, P3 492a76d8, P4 system.configuration, P5 2.0.0.0, P6 471ebf00, P7 1a6, P8 136, P9 ioibmurhynrxkw0zxkyrvfn0boyyufow, P10 NIL.
After doing some gooooooogling I got to the following website: http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/9ec62bfb-af83-4cbe-afae-129bda463506/ which let me to http://devproj20.blogspot.com/2007/03/eventtype-clr20r3-from-windows-service.html.
There was stated that 'The error is an example of an unhandled exception being thrown out of the application. You can make some sense of the error by implementing a handler for the UnhandledException event on the current AppDomain that your application is running in. This event will pass in the exception object that has been thrown, so you can log it to the Event Viewer in a more meaningful fashion.'
So I handled the UnhandledException in my code by writing the following code:
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
/// <summary>
/// Handles the UnhandledException event of the CurrentDomain control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.UnhandledExceptionEventArgs"/> instance containing the event data.</param>
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Exception exception = e.ExceptionObject as Exception;
if (exception != null)
{
System.Diagnostics.EventLog.WriteEntry("service", exception.InnerException.Message, EventLogEntryType.Error);
}
}
|category: Other
|Views: 25
tags:
another
Everyones tags:
No tags
Your Tags: