G
Guest
I am trying to get a custom provider to receive health monitoring events in
vb.net, whidbey beta 1. I have a health monitoring setup like this in my
web.config:
<healthMonitoring enabled="true">
<providers>
<add name="LocalSQL"
type="System.Web.Management.SqlWebEventProvider"
connectionStringName="connLocalSQL" />
<add name="CustomProvider"
type="TestDll.Test.claWebEventProvider"
/>
</providers>
<eventMappings>
<add name="MyEvent"
type="TestDll.Test.claWebEvent"
/>
<!-- Add from Machine.config.comments;
Doesn't work with or without this using a custom class
derived from WebRequestEvent or otherwise.-->
<remove name="Request Processing Events" />
<add name="Request Processing Events"
type="System.Web.Management.WebRequestEvent,System.Web,Version=2.0.3600.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
</eventMappings>
<rules>
<add name="OnCustom"
eventName="MyEvent"
provider="CustomProvider" />
<add name="OnRequest"
eventName="Request Processing Events"
provider="CustomProvider"
/>
<add name="OnError"
eventName="All Errors"
provider="CustomProvider"
/>
</rules>
</healthMonitoring>
I can use either my SqlWebEventProvider or my custom provider and receive
error events (by causing an exception) and my custom event (by instantiating
and raising it).
My problem is that so far I have been unable to receive a WebRequestEvent. I
thought from looking at Machine.config.comments that this would be fired on
request and that all I have to do to receive it is, as with the "All Errors"
event, set up a rule to point it at my provider.
I would appreciate it if someone could explain to me how to use
WebRequestEvents and the "Request Processing Events" built-in event to
capture request information using the health monitoring framework.
Thanks.
vb.net, whidbey beta 1. I have a health monitoring setup like this in my
web.config:
<healthMonitoring enabled="true">
<providers>
<add name="LocalSQL"
type="System.Web.Management.SqlWebEventProvider"
connectionStringName="connLocalSQL" />
<add name="CustomProvider"
type="TestDll.Test.claWebEventProvider"
/>
</providers>
<eventMappings>
<add name="MyEvent"
type="TestDll.Test.claWebEvent"
/>
<!-- Add from Machine.config.comments;
Doesn't work with or without this using a custom class
derived from WebRequestEvent or otherwise.-->
<remove name="Request Processing Events" />
<add name="Request Processing Events"
type="System.Web.Management.WebRequestEvent,System.Web,Version=2.0.3600.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
</eventMappings>
<rules>
<add name="OnCustom"
eventName="MyEvent"
provider="CustomProvider" />
<add name="OnRequest"
eventName="Request Processing Events"
provider="CustomProvider"
/>
<add name="OnError"
eventName="All Errors"
provider="CustomProvider"
/>
</rules>
</healthMonitoring>
I can use either my SqlWebEventProvider or my custom provider and receive
error events (by causing an exception) and my custom event (by instantiating
and raising it).
My problem is that so far I have been unable to receive a WebRequestEvent. I
thought from looking at Machine.config.comments that this would be fired on
request and that all I have to do to receive it is, as with the "All Errors"
event, set up a rule to point it at my provider.
I would appreciate it if someone could explain to me how to use
WebRequestEvents and the "Request Processing Events" built-in event to
capture request information using the health monitoring framework.
Thanks.