Friday, December 7, 2012

EventLogProvider

<The following exception was thrown by the web event provider 'EventLogProvider' in the application '/applicationname' (in an application lifetime a maximum of one exception will be logged per provider instance):
System.Web.HttpException: The EventLogWebEventProvider provider failed to log an event with the error code 0x80070057.
at System.Web.Management.EventLogWebEventProvider.ProcessEvent(WebBaseEvent eventRaised)at System.Web.Management.WebBaseEvent.RaiseInternal(WebBaseEvent eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1)

What is EventLogProvider
EventLogProvider is one of the ASP.NET providers. .NET 2.0 comes with web event providers for logging web events in the windows event log (EventLogWebEventProvider).
Web event providers provide the interface between ASP.NET's health monitoring subsystem and data sources that log or further process the events ("Web events") fired by that subsystem.

Can we troubleshoot from this log?
Error code 0x80070057 means invalid parameter. When EventLogProvider tried to log an entry, it found that an invalid parameter was passed to the function call.
It is hard to debug as we don't know what parameters were passed.

How to enhance in the future.
We can custom Web Event Provider by deriving from System.Web.Management.WebEventProvider. By doing this we can log web events in media not supported by the built-in web event providers.

No comments:

Post a Comment