How to raise a WebBaseErrorEvent or WebManagementEvent

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
 
B

bruce barker

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

-- bruce (sqlworkcom)
 
S

Steven Cheng[MSFT]

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.




--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top