BufferedWebEventProvider.ProcessEvent Method (WebBaseEvent)
.NET Framework (current version)
Processes the event passed to the provider.
Assembly: System.Web (in System.Web.dll)
Parameters
- eventRaised
-
Type:
System.Web.Management.WebBaseEvent
The WebBaseEvent object to process.
This is the method that ASP.NET health monitoring calls to start the processing of the event. If buffering is enabled, the event information is buffered; otherwise, it is dispatched to the current logging mechanism.
The following code example shows how to implement the ProcessEvent method.
// Processes the incoming events. // This method performs custom processing and, // if buffering is enabled, it calls the // base.ProcessEvent to buffer the event // information. public override void ProcessEvent( WebBaseEvent eventRaised) { if (UseBuffering) // Buffering enabled, call the // base event to buffer event information. base.ProcessEvent(eventRaised); else { // Buffering disabled, store the // current event now. customInfo.AppendLine( "*** Buffering disabled ***"); customInfo.AppendLine( eventRaised.ToString()); // Store the information in the specified file. StoreToFile(customInfo, logFilePath, FileMode.Append); } }
.NET Framework
Available since 2.0
Available since 2.0
Show: