WebEventBufferFlushInfo Class


Contains the parameters defining the flush buffer characteristics.

Namespace:   System.Web.Management
Assembly:  System.Web (in System.Web.dll)


Public NotInheritable Class WebEventBufferFlushInfo


Gets the events collection in the current message.


Gets the number of events dropped since the last notification.


Gets the number of events in the buffer.


Gets the date and the time of the last notification.


Gets the message sequence in the current notification.


Gets the current notification type.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

ASP.NET health monitoring allows production and operations staff to manage deployed Web applications. The System.Web.Management namespace contains the health-event types responsible for packaging application health-status data and the provider types responsible for processing this data. It also contains supporting types that help during the management of health events.

The WebEventBufferFlushInfo class defines values that identify the buffer's current status. An instance of the class is passed as a parameter to the ProcessEventFlush method that processes the messages that have been buffered. ASP.NET health monitoring calls this method when the flushing of the buffer is required. This is determined by the parameters defined by the bufferModes element in the healthMonitoring configuration section.


By design, the buffering mechanism might drop some events in order to keep pace with the incoming events. It is up to the user to adjust this mechanism by properly modifying the bufferModes element in the healthMonitoring configuration section.

The following code example shows how to use the WebEventBufferFlushInfo class. This code example is part of a larger example provided for the BufferedWebEventProvider class.

    ' Processes the messages that have been buffered.
    ' It is called by the ASP.NET when the flushing of 
    ' the buffer is required according to the parameters 
    ' defined in the <bufferModes> element of the 
    ' <healthMonitoring> configuration section.
    Public Overrides Sub ProcessEventFlush(ByVal flushInfo _
    As WebEventBufferFlushInfo)

        ' Customize event information to be sent to 
        ' the Windows Event Viewer Application Log.
        customInfo.AppendLine( _
        "SampleEventLogWebEventProvider buffer flush.")

        customInfo.AppendLine(String.Format( _
        "NotificationType: {0}", _

        customInfo.AppendLine(String.Format( _
        "EventsInBuffer: {0}", _

        customInfo.AppendLine(String.Format( _
        "EventsDiscardedSinceLastNotification: {0}", _
GetEventsDiscardedSinceLastNotification( _

        ' Read each buffered event and send it to the
        ' Application Log.
        Dim eventRaised As WebBaseEvent
        For Each eventRaised In flushInfo.Events
        Next eventRaised
        ' Store the information in the specified file.
        StoreToFile(customInfo, logFilePath, _
    End Sub 'ProcessEventFlush

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top