Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

WebEventBufferFlushInfo Class

Contains the parameters defining the flush buffer characteristics.

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

public sealed class WebEventBufferFlushInfo
public final class WebEventBufferFlushInfo
public final class WebEventBufferFlushInfo
Not applicable.

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.

NoteNote:

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.
public override void ProcessEventFlush(
    WebEventBufferFlushInfo flushInfo)
{

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

    customInfo.AppendLine(
        string.Format("NotificationType: {0}",
        GetNotificationType(flushInfo)));

    customInfo.AppendLine(
        string.Format("EventsInBuffer: {0}",
        GetEventsInBuffer(flushInfo)));

    customInfo.AppendLine(
        string.Format(
        "EventsDiscardedSinceLastNotification: {0}",
        GetEventsDiscardedSinceLastNotification(flushInfo)));

   
    // Read each buffered event and send it to the
    // Application Log.
    foreach (WebBaseEvent eventRaised in flushInfo.Events)
        customInfo.AppendLine(eventRaised.ToString());

    // Store the information in the specified file.
    StoreToFile(customInfo, logFilePath, FileMode.Append);
}

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

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.