B
brad.serbus
I am trying to figure out a way to have health monitoring throw
different Event IDs into the event log, and am having a hard time.
None of the customization that I have looked through so far has been
helpful, yet.
As an example, here's a text copy of a typical unhandled exception
from the event log:
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 6/6/2007
Time: 4:39:35 PM
User: N/A
Computer: DEV-brad1
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/6/2007 4:39:35 PM
Event time (UTC): 6/6/2007 11:39:35 PM
Event ID: 45eb4075696844d69285a14804de3816
Event sequence: 3
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: 702995e8-2-128256467718720433
Trust level: Full
Application Virtual Path: /
Application Path: C:\src\Location\
Machine name: DEV-brad1
Process information:
Process ID: 2400
Process name: WebDev.WebServer.exe
Account name: DOMAIN\brad
Exception information:
Exception type: ArgumentException
Exception message: Value does not fall within the expected range.
Request information:
Request URL: http://localhost:4090/Pages/Default.aspx
Request path: /Pages/Default.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: DOMAIN\brad
Thread information:
Thread ID: 4
Thread account name: DOMAIN\brad
Is impersonating: False
Stack trace: at
DOMAIN.Location.Pages.Default.OnPreRender(EventArgs e) in C:\src
\Location\DOMAIN.Location\Pages\Default.aspx.cs:line 48
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I want to be able to map different exceptions on to Event ID's other
than 1309. I found where someone figured out how to change the Event
Code (http://www.newtonsoft.com/blog/archive/2006/08/10/
WebRequestDetailedErrorEvent.aspx), but, our monitoring software keys
off of the Event ID, hence the need for more granularity than having
all exceptions end up with Event ID 1309. Is this exception->Event ID
mapping hard-coded? If configurable, can someone point me in the
right direction? If I have to customize health monitoring, can you
point me at some sample code? Any other ideas?
Thanks,
Brad
different Event IDs into the event log, and am having a hard time.
None of the customization that I have looked through so far has been
helpful, yet.
As an example, here's a text copy of a typical unhandled exception
from the event log:
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 6/6/2007
Time: 4:39:35 PM
User: N/A
Computer: DEV-brad1
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/6/2007 4:39:35 PM
Event time (UTC): 6/6/2007 11:39:35 PM
Event ID: 45eb4075696844d69285a14804de3816
Event sequence: 3
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: 702995e8-2-128256467718720433
Trust level: Full
Application Virtual Path: /
Application Path: C:\src\Location\
Machine name: DEV-brad1
Process information:
Process ID: 2400
Process name: WebDev.WebServer.exe
Account name: DOMAIN\brad
Exception information:
Exception type: ArgumentException
Exception message: Value does not fall within the expected range.
Request information:
Request URL: http://localhost:4090/Pages/Default.aspx
Request path: /Pages/Default.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: DOMAIN\brad
Thread information:
Thread ID: 4
Thread account name: DOMAIN\brad
Is impersonating: False
Stack trace: at
DOMAIN.Location.Pages.Default.OnPreRender(EventArgs e) in C:\src
\Location\DOMAIN.Location\Pages\Default.aspx.cs:line 48
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I want to be able to map different exceptions on to Event ID's other
than 1309. I found where someone figured out how to change the Event
Code (http://www.newtonsoft.com/blog/archive/2006/08/10/
WebRequestDetailedErrorEvent.aspx), but, our monitoring software keys
off of the Event ID, hence the need for more granularity than having
all exceptions end up with Event ID 1309. Is this exception->Event ID
mapping hard-coded? If configurable, can someone point me in the
right direction? If I have to customize health monitoring, can you
point me at some sample code? Any other ideas?
Thanks,
Brad