-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
WebViewStateFailureAuditEvent.xml
217 lines (198 loc) · 14.6 KB
/
WebViewStateFailureAuditEvent.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<Type Name="WebViewStateFailureAuditEvent" FullName="System.Web.Management.WebViewStateFailureAuditEvent">
<TypeSignature Language="C#" Value="public class WebViewStateFailureAuditEvent : System.Web.Management.WebFailureAuditEvent" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit WebViewStateFailureAuditEvent extends System.Web.Management.WebFailureAuditEvent" />
<TypeSignature Language="DocId" Value="T:System.Web.Management.WebViewStateFailureAuditEvent" />
<TypeSignature Language="VB.NET" Value="Public Class WebViewStateFailureAuditEvent
Inherits WebFailureAuditEvent" />
<TypeSignature Language="F#" Value="type WebViewStateFailureAuditEvent = class
 inherit WebFailureAuditEvent" />
<TypeSignature Language="C++ CLI" Value="public ref class WebViewStateFailureAuditEvent : System::Web::Management::WebFailureAuditEvent" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.Management.WebFailureAuditEvent</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides Web-application view-state-related-failure information.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
ASP.NET health monitoring allows production and operations staff to manage deployed Web applications. The <xref:System.Web.Management?displayProperty=nameWithType> 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.
ASP.NET raises events of type <xref:System.Web.Management.WebViewStateFailureAuditEvent> when a view-state failure occurs. This failure indicates either an attempt to tamper with view state or its reuse from another machine with a different key. The related audit event code is <xref:System.Web.Management.WebEventCodes.AuditInvalidViewStateFailure>.
> [!NOTE]
> In most cases you will be able to use the ASP.NET health-monitoring types as implemented, and you will control the health-monitoring system by specifying values in the `healthMonitoring` configuration section. You can also derive from the health-monitoring types to create your own custom events and providers.
## Examples
The following is an excerpt of a configuration file showing how to configure the <xref:System.Web.Management.EventLogWebEventProvider> to capture view-state failures. For completeness we are showing the setup for the `provider` and `eventMappings` sections. They are already set by default. The only thing you need to do is to provide the setup for the `rules` section. Refer to `healthMonitoring` for more information.
To generate a view-state error, enter a URL in your browser with the following query string:
```
?__VIEWSTATEFIELDCOUNT=1&__VIEWSTATE=bogus
```
The Windows Application Eventlog will capture a view-state failure, if you enter the following configuration settings.
```
<healthMonitoring
enabled="true"
heartBeatInterval="0">
<providers>
// Configure the provider to process
// the health events.
<add name="EventLogProvider"
type="System.Web.Management.EventLogWebEventProvider,
System.Web,Version=2.0.3600.0,Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
<eventMappings>
<clear />
// Configure the WebFailureAuditEvent
// object to handle the Viewstate failures.
<add name="Failure Audits"
type="System.Web.Management.WebFailureAuditEvent,
System.Web,Version=2.0.3600.0,Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</eventMappings>
<rules>
<clear/>
// Configure the connection between the
// application lifetime event object
// and the provider that must process it.
<add name="Viewstate Failure Events "
eventName="Failure Events"
provider="EventLogProvider"
profile="Default"
minInterval="00:01:00" />
</rules>
</healthMonitoring>
```
]]></format>
</remarks>
<altmember cref="T:System.Web.Management.WebEventCodes" />
<related type="Article" href="https://msdn.microsoft.com/library/e003f224-70fe-4cd8-a71a-2dc81e2d7e4c">ASP.NET Health Monitoring Overview</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/75x4ha6s(v=vs.100)">ASP.NET State Management Overview</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.Management.WebViewStateFailureAuditEvent" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal WebViewStateFailureAuditEvent (string message, object eventSource, int eventCode, System.Web.UI.ViewStateException viewStateException);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor(string message, object eventSource, int32 eventCode, class System.Web.UI.ViewStateException viewStateException) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.WebViewStateFailureAuditEvent.#ctor(System.String,System.Object,System.Int32,System.Web.UI.ViewStateException)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, viewStateException As ViewStateException)" />
<MemberSignature Language="F#" Value="new System.Web.Management.WebViewStateFailureAuditEvent : string * obj * int * System.Web.UI.ViewStateException -> System.Web.Management.WebViewStateFailureAuditEvent" Usage="new System.Web.Management.WebViewStateFailureAuditEvent (message, eventSource, eventCode, viewStateException)" />
<MemberSignature Language="C++ CLI" Value="protected public:
 WebViewStateFailureAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, System::Web::UI::ViewStateException ^ viewStateException);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="message" Type="System.String" />
<Parameter Name="eventSource" Type="System.Object" />
<Parameter Name="eventCode" Type="System.Int32" />
<Parameter Name="viewStateException" Type="System.Web.UI.ViewStateException" />
</Parameters>
<Docs>
<param name="message">The event description.</param>
<param name="eventSource">The object that is the source of the event.</param>
<param name="eventCode">The code associated with the event. When you implement a custom event, the event code must be greater than <see cref="F:System.Web.Management.WebEventCodes.WebExtendedBase" />.</param>
<param name="viewStateException">The <see cref="T:System.Web.UI.ViewStateException" /> caused by the failure.</param>
<summary>Initializes the <see cref="T:System.Web.Management.WebViewStateFailureAuditEvent" /> class using the supplied parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor is used internally by the ASP.NET health-monitoring system. You will never use it to instantiate a <xref:System.Web.Management.WebViewStateFailureAuditEvent> object, but you can call this constructor when implementing your own event type that inherits from this class.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal WebViewStateFailureAuditEvent (string message, object eventSource, int eventCode, int eventDetailCode, System.Web.UI.ViewStateException viewStateException);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor(string message, object eventSource, int32 eventCode, int32 eventDetailCode, class System.Web.UI.ViewStateException viewStateException) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.WebViewStateFailureAuditEvent.#ctor(System.String,System.Object,System.Int32,System.Int32,System.Web.UI.ViewStateException)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer, viewStateException As ViewStateException)" />
<MemberSignature Language="F#" Value="new System.Web.Management.WebViewStateFailureAuditEvent : string * obj * int * int * System.Web.UI.ViewStateException -> System.Web.Management.WebViewStateFailureAuditEvent" Usage="new System.Web.Management.WebViewStateFailureAuditEvent (message, eventSource, eventCode, eventDetailCode, viewStateException)" />
<MemberSignature Language="C++ CLI" Value="protected public:
 WebViewStateFailureAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode, System::Web::UI::ViewStateException ^ viewStateException);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="message" Type="System.String" />
<Parameter Name="eventSource" Type="System.Object" />
<Parameter Name="eventCode" Type="System.Int32" />
<Parameter Name="eventDetailCode" Type="System.Int32" />
<Parameter Name="viewStateException" Type="System.Web.UI.ViewStateException" />
</Parameters>
<Docs>
<param name="message">The event description.</param>
<param name="eventSource">The object that is the source of the event.</param>
<param name="eventCode">The code associated with the event. When you implement a custom event, the event code must be greater than <see cref="F:System.Web.Management.WebEventCodes.WebExtendedBase" />.</param>
<param name="eventDetailCode">The <see cref="T:System.Web.Management.WebEventCodes" /> value that specifies the detailed identifier for the event.</param>
<param name="viewStateException">The <see cref="T:System.Web.UI.ViewStateException" /> caused by the failure.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.Management.WebViewStateFailureAuditEvent" /> class using the supplied parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor is used internally by the ASP.NET health-monitoring system. You will never use it to instantiate a <xref:System.Web.Management.WebViewStateFailureAuditEvent> object, but you can call this constructor when implementing your own event type that inherits from this class.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ViewStateException">
<MemberSignature Language="C#" Value="public System.Web.UI.ViewStateException ViewStateException { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.ViewStateException ViewStateException" />
<MemberSignature Language="DocId" Value="P:System.Web.Management.WebViewStateFailureAuditEvent.ViewStateException" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ViewStateException As ViewStateException" />
<MemberSignature Language="F#" Value="member this.ViewStateException : System.Web.UI.ViewStateException" Usage="System.Web.Management.WebViewStateFailureAuditEvent.ViewStateException" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::UI::ViewStateException ^ ViewStateException { System::Web::UI::ViewStateException ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.ViewStateException</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the exception caused by the failure.</summary>
<value>The <see cref="T:System.Web.UI.ViewStateException" /> caused by the failure.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.ViewStateException> indicates either an attempt to tamper with view state or its reuse from another machine with a different key.
]]></format>
</remarks>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/75x4ha6s(v=vs.100)">ASP.NET State Management Overview</related>
</Docs>
</Member>
</Members>
</Type>