How to raise a WebBaseErrorEvent or WebManagementEvent

  • Thread starter Thread starter Max2006
  • Start date Start date
M

Max2006

Hi,

We are using ASP.NET 2.0 health and monitoring provider.
I know that the platform raises events automatically.

I just wanted to know how can we raise them in C# code? I am trying to raise
WebBaseErrorEvent or WebManagementEvent.

Thank you,
Max
 
(new WebRequestEvent("my message",
null,
WebEventCodes.WebExtendedbase +1)).Raise();

-- bruce (sqlworkcom)
 
Thanks for bruce's input.

Hi Max,

As Bruce suggested, you can simply create the event instance and call
"Raise" method to raise it. Also, it support creating custom event, here
are some articles describing this:

#How To: Use Health Monitoring in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998306.aspx#paght000011_step1

#Raising Custom ASP.NET Health Monitoring Events Example
http://msdn2.microsoft.com/en-us/library/ms227545.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
 
Back
Top