WebEventCodes WebEventCodes WebEventCodes WebEventCodes Class

Definition

Defines the codes associated with the ASP.NET health monitoring events.

public ref class WebEventCodes sealed
public sealed class WebEventCodes
type WebEventCodes = class
Public NotInheritable Class WebEventCodes
Inheritance
WebEventCodesWebEventCodesWebEventCodesWebEventCodes

Remarks

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 WebEventCodes class contains codes that identify types of health-monitoring events. Two types of codes are defined within the class: major codes, which identify the ASP.NET health-monitoring events; and detail codes, which provide more information about a related major code. These codes are implemented as integers, rather than as an enumeration, to allow for extensibility.

When a health-monitoring event is raised, it is associated with a major event code. The following list identifies the categories of major event codes that are defined within the WebEventCodes class:

  • Application codes. Application codes identify events in the lifetime of an application, such as startup and shutdown events. Their values are greater than the ApplicationCodeBase field constant. They are associated with the WebApplicationLifetimeEvent event type. The heartbeat event is a special kind of application event. It identifies events raised at periodic intervals to provide information relative to the state of the running process. It is associated with the WebHeartbeatEvent event type.

  • Request codes. Request codes identify non-error events that provide per-request information. Their values are greater than the RequestCodeBase field constant. They are associated with the WebRequestEvent event type.

  • Error codes. Error codes identify events that contain information about two kinds of errors: errors specifically related to a Web request and systemic errors. The errors related to Web requests include unhandled exceptions, view-state errors, and input-validation errors. They are associated with the WebRequestErrorEvent event type. The systemic errors relate to configuration or application code, including parser errors and compilation errors. They are associated with the WebErrorEvent event type. Both kinds of errors have values greater than the ErrorCodeBase field constant.

  • Audit codes. Audit codes identify events that contain auditable information such as login attempts, access security violations, and authorization violations. Their values are greater than AuditCodeBase. They are associated with WebAuditEvent and its derived event types.

  • Miscellaneous codes. Miscellaneous codes do not identify events but are used to flag nonstandard event information. Their values are greater than MiscCodeBase. Refer also to WebEventProviderInformation for more information.

You can create your own custom event code by choosing code values above WebExtendedBase.

In the eventMappings health-monitoring configuration element, you can optionally specify an event-code range. If the event code range is specified, the mapping only applies to the events that have an event code within that range; otherwise, it applies to all the event codes. The following configuration file excerpt shows the EventLogWebEventProvider configured to handle WebFailureAuditEvent events whose event codes belong to the audit category.

<healthMonitoring>  
  <eventMappings>   
    <add name="Failure Audits" type=  
      "System.Web.Management.WebFailureAuditEvent,System.Web, Version=2.0.3600.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />  
  </eventMappings>  

  <rules>  
    <add name="Failure Audits Default"  
      eventName="Failure Audits"  
      provider="EventLogProvider"  
      profile="Default"  
      minInterval="00:01:00" />  
  </rules>  
</healthMonitoring>  

You can create your own custom event code by choosing code values above WebExtendedBase.

Fields

ApplicationCodeBase ApplicationCodeBase ApplicationCodeBase ApplicationCodeBase

Identifies the offset for the ASP.NET health-monitoring application event codes. This field is constant.

ApplicationCompilationEnd ApplicationCompilationEnd ApplicationCompilationEnd ApplicationCompilationEnd

Represents the event code indicating that the compilation of the application has finished. This field is constant.

ApplicationCompilationStart ApplicationCompilationStart ApplicationCompilationStart ApplicationCompilationStart

Represents the event code indicating that the compilation of the application has started. This field is constant.

ApplicationDetailCodeBase ApplicationDetailCodeBase ApplicationDetailCodeBase ApplicationDetailCodeBase

Identifies the offset for the application detail event codes. This field is constant.

ApplicationHeartbeat ApplicationHeartbeat ApplicationHeartbeat ApplicationHeartbeat

Represents the event code indicating that a heartbeat event occurred. This field is constant.

ApplicationShutdown ApplicationShutdown ApplicationShutdown ApplicationShutdown

Represents the event code indicating that an application has shut down. This field is constant.

ApplicationShutdownBinDirChangeOrDirectoryRename ApplicationShutdownBinDirChangeOrDirectoryRename ApplicationShutdownBinDirChangeOrDirectoryRename ApplicationShutdownBinDirChangeOrDirectoryRename

Represents the event code indicating a subdirectory in the application's Bin directory was changed or renamed. This field is constant.

ApplicationShutdownBrowsersDirChangeOrDirectoryRename ApplicationShutdownBrowsersDirChangeOrDirectoryRename ApplicationShutdownBrowsersDirChangeOrDirectoryRename ApplicationShutdownBrowsersDirChangeOrDirectoryRename

Represents the event code indicating a subdirectory in the Browsers application directory was changed or renamed. This field is constant.

ApplicationShutdownBuildManagerChange ApplicationShutdownBuildManagerChange ApplicationShutdownBuildManagerChange ApplicationShutdownBuildManagerChange

Represents the event code indicating that the build manager has made a change that requires the application domain to be shut down.

ApplicationShutdownChangeInGlobalAsax ApplicationShutdownChangeInGlobalAsax ApplicationShutdownChangeInGlobalAsax ApplicationShutdownChangeInGlobalAsax

Represents the event code indicating that the Global.asax file has changed. This field is constant.

ApplicationShutdownChangeInSecurityPolicyFile ApplicationShutdownChangeInSecurityPolicyFile ApplicationShutdownChangeInSecurityPolicyFile ApplicationShutdownChangeInSecurityPolicyFile

Represents the event code indicating that the security policy file has changed. This field is constant.

ApplicationShutdownCodeDirChangeOrDirectoryRename ApplicationShutdownCodeDirChangeOrDirectoryRename ApplicationShutdownCodeDirChangeOrDirectoryRename ApplicationShutdownCodeDirChangeOrDirectoryRename

Represents the event code indicating a subdirectory in the App_Code directory was changed or renamed. This field is constant.

ApplicationShutdownConfigurationChange ApplicationShutdownConfigurationChange ApplicationShutdownConfigurationChange ApplicationShutdownConfigurationChange

Represents the event code indicating that the configuration file has changed. This field is constant.

ApplicationShutdownHostingEnvironment ApplicationShutdownHostingEnvironment ApplicationShutdownHostingEnvironment ApplicationShutdownHostingEnvironment

Represents the event code indicating that the hosting environment is shutting down. This field is constant.

ApplicationShutdownHttpRuntimeClose ApplicationShutdownHttpRuntimeClose ApplicationShutdownHttpRuntimeClose ApplicationShutdownHttpRuntimeClose

Represents the event code indicating that the ASP.NET run time was explicitly closed. This field is constant.

ApplicationShutdownIdleTimeout ApplicationShutdownIdleTimeout ApplicationShutdownIdleTimeout ApplicationShutdownIdleTimeout

Represents the event code indicating that the idle time-out was exceeded. This field is constant.

ApplicationShutdownInitializationError ApplicationShutdownInitializationError ApplicationShutdownInitializationError ApplicationShutdownInitializationError

Represents the event code indicating an application-initialization error occurred. This field is constant.

ApplicationShutdownMaxRecompilationsReached ApplicationShutdownMaxRecompilationsReached ApplicationShutdownMaxRecompilationsReached ApplicationShutdownMaxRecompilationsReached

Represents the event code indicating that the maximum number of recompilations was reached. This field is constant.

ApplicationShutdownPhysicalApplicationPathChanged ApplicationShutdownPhysicalApplicationPathChanged ApplicationShutdownPhysicalApplicationPathChanged ApplicationShutdownPhysicalApplicationPathChanged

Represents the event code indicating that the physical path of the application has changed. This field is constant.

ApplicationShutdownResourcesDirChangeOrDirectoryRename ApplicationShutdownResourcesDirChangeOrDirectoryRename ApplicationShutdownResourcesDirChangeOrDirectoryRename ApplicationShutdownResourcesDirChangeOrDirectoryRename

Represents the event code indicating a subdirectory in the App_Resources directory was changed or renamed. This field is constant.

ApplicationShutdownUnknown ApplicationShutdownUnknown ApplicationShutdownUnknown ApplicationShutdownUnknown

Represents the event code indicating that the application shutdown reason is unknown. This field is constant.

ApplicationShutdownUnloadAppDomainCalled ApplicationShutdownUnloadAppDomainCalled ApplicationShutdownUnloadAppDomainCalled ApplicationShutdownUnloadAppDomainCalled

Represents the event code indicating that the application domain was explicitly unloaded. This field is constant.

ApplicationStart ApplicationStart ApplicationStart ApplicationStart

Represents the event code indicating that an application has started. This field is constant.

AuditCodeBase AuditCodeBase AuditCodeBase AuditCodeBase

Identifies the offset for the ASP.NET health-monitoring audit event codes. This field is constant.

AuditDetailCodeBase AuditDetailCodeBase AuditDetailCodeBase AuditDetailCodeBase

Identifies the offset for the ASP.NET audit-detail event codes. This field is constant.

AuditFileAuthorizationFailure AuditFileAuthorizationFailure AuditFileAuthorizationFailure AuditFileAuthorizationFailure

Represents the event code indicating that a file-authorization failure occurred during a Web request. This field is constant.

AuditFileAuthorizationSuccess AuditFileAuthorizationSuccess AuditFileAuthorizationSuccess AuditFileAuthorizationSuccess

Represents the event code indicating that a file-authorization success occurred during a Web request. This field is constant.

AuditFormsAuthenticationFailure AuditFormsAuthenticationFailure AuditFormsAuthenticationFailure AuditFormsAuthenticationFailure

Represents the event code indicating a form authentication failure occurred during a Web request. This field is constant.

AuditFormsAuthenticationSuccess AuditFormsAuthenticationSuccess AuditFormsAuthenticationSuccess AuditFormsAuthenticationSuccess

Represents the event code indicating a form-authentication success occurred during a Web request. This field is constant.

AuditInvalidViewStateFailure AuditInvalidViewStateFailure AuditInvalidViewStateFailure AuditInvalidViewStateFailure

Represents the event code indicating that the view-state verification failed. This field is constant.

AuditMembershipAuthenticationFailure AuditMembershipAuthenticationFailure AuditMembershipAuthenticationFailure AuditMembershipAuthenticationFailure

Represents the event code indicating that a membership-authentication failure occurred during a Web request. This field is constant.

AuditMembershipAuthenticationSuccess AuditMembershipAuthenticationSuccess AuditMembershipAuthenticationSuccess AuditMembershipAuthenticationSuccess

Represents the event code indicating that a membership-authentication success occurred during a Web request. This field is constant.

AuditUnhandledAccessException AuditUnhandledAccessException AuditUnhandledAccessException AuditUnhandledAccessException

Represents the event code indicating that an unhandled access exception occurred during a Web request. This field is constant.

AuditUnhandledSecurityException AuditUnhandledSecurityException AuditUnhandledSecurityException AuditUnhandledSecurityException

Represents the event code indicating that an unhandled security exception occurred during a Web request. This field is constant.

AuditUrlAuthorizationFailure AuditUrlAuthorizationFailure AuditUrlAuthorizationFailure AuditUrlAuthorizationFailure

Represents the event code indicating that a URL-authorization failure occurred during a Web request. This field is constant.

AuditUrlAuthorizationSuccess AuditUrlAuthorizationSuccess AuditUrlAuthorizationSuccess AuditUrlAuthorizationSuccess

Represents the event code indicating a URL-authorization success occurred during a Web request. This field is constant.

ErrorCodeBase ErrorCodeBase ErrorCodeBase ErrorCodeBase

Identifies the offset for the ASP.NET health-monitoring error event codes. This field is constant.

ExpiredTicketFailure ExpiredTicketFailure ExpiredTicketFailure ExpiredTicketFailure

Represents the event code indicating that the supplied ticket is expired. This field is constant.

InvalidEventCode InvalidEventCode InvalidEventCode InvalidEventCode

Represents the event code indicating that the event code value is not allowed. This field is constant.

InvalidTicketFailure InvalidTicketFailure InvalidTicketFailure InvalidTicketFailure

Represents the event code indicating that the supplied ticket is invalid. This field is constant.

InvalidViewState InvalidViewState InvalidViewState InvalidViewState

Represents the event code indicating that the supplied view state is invalid. This field is constant.

InvalidViewStateMac InvalidViewStateMac InvalidViewStateMac InvalidViewStateMac

Represents the event code indicating that the supplied view state failed the integrity check. This field is constant.

MiscCodeBase MiscCodeBase MiscCodeBase MiscCodeBase

Identifies the offset for the ASP.NET health-monitoring Web miscellaneous event codes. This field is constant.

RequestCodeBase RequestCodeBase RequestCodeBase RequestCodeBase

Identifies the offset for the ASP.NET health-monitoring Web-request event codes. This field is constant.

RequestTransactionAbort RequestTransactionAbort RequestTransactionAbort RequestTransactionAbort

Represents the event code indicating that the Web request was aborted. This field is constant.

RequestTransactionComplete RequestTransactionComplete RequestTransactionComplete RequestTransactionComplete

Represents the event code indicating that the Web request was completed. This field is constant.

RuntimeErrorPostTooLarge RuntimeErrorPostTooLarge RuntimeErrorPostTooLarge RuntimeErrorPostTooLarge

Represents the event code indicating that the size of the posted information exceeded the allowed limits. This field is constant.

RuntimeErrorRequestAbort RuntimeErrorRequestAbort RuntimeErrorRequestAbort RuntimeErrorRequestAbort

Represents the event code indicating that the Web request has been aborted.

RuntimeErrorUnhandledException RuntimeErrorUnhandledException RuntimeErrorUnhandledException RuntimeErrorUnhandledException

Represents the event code indicating an unhandled exception occurred. This field is constant.

RuntimeErrorValidationFailure RuntimeErrorValidationFailure RuntimeErrorValidationFailure RuntimeErrorValidationFailure

Represents the event code indicating that a validation error occurred. This field is constant.

RuntimeErrorViewStateFailure RuntimeErrorViewStateFailure RuntimeErrorViewStateFailure RuntimeErrorViewStateFailure

Represents the event code indicating that a view-state failure occurred. This field is constant.

RuntimeErrorWebResourceFailure RuntimeErrorWebResourceFailure RuntimeErrorWebResourceFailure RuntimeErrorWebResourceFailure

Represents the event code indicating that there was an error accessing a web resource. This field is constant.

SqlProviderEventsDropped SqlProviderEventsDropped SqlProviderEventsDropped SqlProviderEventsDropped

Represents the event code indicating that the SQL provider dropped events. This field is constant.

StateServerConnectionError StateServerConnectionError StateServerConnectionError StateServerConnectionError

Represents the event code indicating that an error occurred while communicating with the state server. This field is constant.

UndefinedEventCode UndefinedEventCode UndefinedEventCode UndefinedEventCode

Represents the event code indicating that the major event code value is not defined. This field is constant.

UndefinedEventDetailCode UndefinedEventDetailCode UndefinedEventDetailCode UndefinedEventDetailCode

Represents the event code indicating that the detail event code value is not defined. This field is constant.

WebErrorCompilationError WebErrorCompilationError WebErrorCompilationError WebErrorCompilationError

Indicates that a compilation error occurred.

WebErrorConfigurationError WebErrorConfigurationError WebErrorConfigurationError WebErrorConfigurationError

Indicates that a configuration error occurred. This field is constant.

WebErrorObjectStateFormatterDeserializationError WebErrorObjectStateFormatterDeserializationError WebErrorObjectStateFormatterDeserializationError WebErrorObjectStateFormatterDeserializationError

Represents the event code indicating that there was an error during the deserialization of the type or value of an object. This field is constant.

WebErrorOtherError WebErrorOtherError WebErrorOtherError WebErrorOtherError

Represents the event code indicating that an unclassified error occurred. This field is constant.

WebErrorParserError WebErrorParserError WebErrorParserError WebErrorParserError

Represents the event code indicating a parser error occurred.

WebErrorPropertyDeserializationError WebErrorPropertyDeserializationError WebErrorPropertyDeserializationError WebErrorPropertyDeserializationError

Represents the event code indicating that there was an error during the deserialization of a property. This field is constant.

WebEventDetailCodeBase WebEventDetailCodeBase WebEventDetailCodeBase WebEventDetailCodeBase

Identifies the offset for the ASP.NET health-monitoring Web-detail event codes.

WebEventProviderInformation WebEventProviderInformation WebEventProviderInformation WebEventProviderInformation

Represents the event code used by providers to record nonstandard information about an event. This field is constant.

WebExtendedBase WebExtendedBase WebExtendedBase WebExtendedBase

Identifies the offset for the custom event codes. This field is constant.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to