-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
WebRequestErrorEvent.xml
262 lines (227 loc) · 15.9 KB
/
WebRequestErrorEvent.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<Type Name="WebRequestErrorEvent" FullName="System.Web.Management.WebRequestErrorEvent">
<TypeSignature Language="C#" Value="public class WebRequestErrorEvent : System.Web.Management.WebBaseErrorEvent" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit WebRequestErrorEvent extends System.Web.Management.WebBaseErrorEvent" />
<TypeSignature Language="DocId" Value="T:System.Web.Management.WebRequestErrorEvent" />
<TypeSignature Language="VB.NET" Value="Public Class WebRequestErrorEvent
Inherits WebBaseErrorEvent" />
<TypeSignature Language="F#" Value="type WebRequestErrorEvent = class
 inherit WebBaseErrorEvent" />
<TypeSignature Language="C++ CLI" Value="public ref class WebRequestErrorEvent : System::Web::Management::WebBaseErrorEvent" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.Management.WebBaseErrorEvent</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Defines the event that carries information about Web-request errors.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Management.WebRequestErrorEvent> is raised if an error occurs during a Web request. Your application should use this event to obtain request-related information as defined by the <xref:System.Web.Management.WebRequestInformation> and the <xref:System.Web.Management.WebThreadInformation> classes.
> [!NOTE]
> In most cases you will use the standard ASP.NET health monitoring types and control their behavior by setting the `healthMonitoring` configuration section. You can also create custom types, as shown in the next example. If you create your custom event type and you need to add your own information, customize the <xref:System.Web.Management.WebBaseEvent.FormatCustomEventDetails%2A> method, this will avoid overwriting or tampering with sensitive system information.
## Examples
The following code example has two parts. The first part is an excerpt of a configuration file that enables ASP.NET to use a custom event. The second part shows how to derive from the <xref:System.Web.Management.WebRequestErrorEvent> class to create the custom event.
```
<healthMonitoring enabled="true" heartBeatInterval="0">
<eventMappings>
<add name="SampleWebRequestErrorEvent" type="SamplesAspNet.SampleWebRequestErrorEvent,webrequesterrorevent,Version=1.0.1573.21654, Culture=neutral, PublicKeyToken=63ada862a6c5af13, processorArchitecture=MSIL"/>
</eventMappings>
<rules>
<add
name="Custom Web Request Error Events"
eventName="SampleWebRequestErrorEvent"
provider="EventLogProvider"
profile="Critical"/>
</rules>
</healthMonitoring>
```
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/CS/webrequesterrorevent.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/VB/webrequesterrorevent.vb" id="Snippet1":::
]]></format>
</remarks>
<related type="Article" href="https://msdn.microsoft.com/library/e003f224-70fe-4cd8-a71a-2dc81e2d7e4c">ASP.NET Health Monitoring 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.WebRequestErrorEvent" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value you use to define your event code or identifier must be greater than the <xref:System.Web.Management.WebEventCodes.WebExtendedBase> field constant.
]]></format>
</remarks>
<altmember cref="T:System.Web.Management.WebEventCodes" />
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal WebRequestErrorEvent (string message, object eventSource, int eventCode, Exception exception);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor(string message, object eventSource, int32 eventCode, class System.Exception exception) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.WebRequestErrorEvent.#ctor(System.String,System.Object,System.Int32,System.Exception)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, exception As Exception)" />
<MemberSignature Language="F#" Value="new System.Web.Management.WebRequestErrorEvent : string * obj * int * Exception -> System.Web.Management.WebRequestErrorEvent" Usage="new System.Web.Management.WebRequestErrorEvent (message, eventSource, eventCode, exception)" />
<MemberSignature Language="C++ CLI" Value="protected public:
 WebRequestErrorEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, Exception ^ exception);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="message" Type="System.String" />
<Parameter Name="eventSource" Type="System.Object" />
<Parameter Name="eventCode" Type="System.Int32" />
<Parameter Name="exception" Type="System.Exception" />
</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 identifier associated with the event. It must be greater than the <see cref="F:System.Web.Management.WebEventCodes.WebExtendedBase" /> field constant.</param>
<param name="exception">The <see cref="T:System.Exception" /> associated with the error.</param>
<summary>Initializes the <see cref="T:System.Web.Management.WebRequestErrorEvent" /> class with specified event parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor allows you to create a <xref:System.Web.Management.WebRequestErrorEvent> event without needing to specify detailed code information about the event itself.
## Examples
The following code example shows how to use this constructor.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/CS/webrequesterrorevent.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/VB/webrequesterrorevent.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal WebRequestErrorEvent (string message, object eventSource, int eventCode, int eventDetailCode, Exception exception);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor(string message, object eventSource, int32 eventCode, int32 eventDetailCode, class System.Exception exception) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.WebRequestErrorEvent.#ctor(System.String,System.Object,System.Int32,System.Int32,System.Exception)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer, exception As Exception)" />
<MemberSignature Language="F#" Value="new System.Web.Management.WebRequestErrorEvent : string * obj * int * int * Exception -> System.Web.Management.WebRequestErrorEvent" Usage="new System.Web.Management.WebRequestErrorEvent (message, eventSource, eventCode, eventDetailCode, exception)" />
<MemberSignature Language="C++ CLI" Value="protected public:
 WebRequestErrorEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode, Exception ^ exception);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<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="exception" Type="System.Exception" />
</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 identifier associated with the event. It must be greater than <see cref="F:System.Web.Management.WebEventCodes.WebExtendedBase" /> field constant.</param>
<param name="eventDetailCode">The event detail code identifier.</param>
<param name="exception">The <see cref="T:System.Exception" /> associated with the error.</param>
<summary>Initializes the <see cref="T:System.Web.Management.WebRequestErrorEvent" /> class with specified event parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this constructor if you need to specify detailed code information about the event.
## Examples
The following code example shows how to use this constructor.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/CS/webrequesterrorevent.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/VB/webrequesterrorevent.vb" id="Snippet3":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IncrementPerfCounters">
<MemberSignature Language="C#" Value="protected internal override void IncrementPerfCounters ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void IncrementPerfCounters() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.WebRequestErrorEvent.IncrementPerfCounters" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub IncrementPerfCounters ()" />
<MemberSignature Language="F#" Value="override this.IncrementPerfCounters : unit -> unit" Usage="webRequestErrorEvent.IncrementPerfCounters " />
<MemberSignature Language="C++ CLI" Value="protected public:
 override void IncrementPerfCounters();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Used internally to increment the relevant performance counters.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RequestInformation">
<MemberSignature Language="C#" Value="public System.Web.Management.WebRequestInformation RequestInformation { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.Management.WebRequestInformation RequestInformation" />
<MemberSignature Language="DocId" Value="P:System.Web.Management.WebRequestErrorEvent.RequestInformation" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property RequestInformation As WebRequestInformation" />
<MemberSignature Language="F#" Value="member this.RequestInformation : System.Web.Management.WebRequestInformation" Usage="System.Web.Management.WebRequestErrorEvent.RequestInformation" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::Management::WebRequestInformation ^ RequestInformation { System::Web::Management::WebRequestInformation ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.Management.WebRequestInformation</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the application request information.</summary>
<value>The application request information.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The standard request information is defined by the <xref:System.Web.Management.WebRequestInformation> class.
## Examples
The following code example shows how to obtain the <xref:System.Web.Management.WebRequestErrorEvent.RequestInformation%2A> property value.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/CS/webrequesterrorevent.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/VB/webrequesterrorevent.vb" id="Snippet5":::
]]></format>
</remarks>
<altmember cref="T:System.Web.Management.WebRequestInformation" />
</Docs>
</Member>
<Member MemberName="ThreadInformation">
<MemberSignature Language="C#" Value="public System.Web.Management.WebThreadInformation ThreadInformation { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.Management.WebThreadInformation ThreadInformation" />
<MemberSignature Language="DocId" Value="P:System.Web.Management.WebRequestErrorEvent.ThreadInformation" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ThreadInformation As WebThreadInformation" />
<MemberSignature Language="F#" Value="member this.ThreadInformation : System.Web.Management.WebThreadInformation" Usage="System.Web.Management.WebRequestErrorEvent.ThreadInformation" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::Management::WebThreadInformation ^ ThreadInformation { System::Web::Management::WebThreadInformation ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.Management.WebThreadInformation</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the application thread information.</summary>
<value>The application thread information.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The standard thread information is defined by the <xref:System.Web.Management.WebThreadInformation> class.
## Examples
The following code example shows how to obtain the <xref:System.Web.Management.WebRequestErrorEvent.ThreadInformation%2A> property value.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/CS/webrequesterrorevent.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Management.WebRequestErrorEvent/VB/webrequesterrorevent.vb" id="Snippet6":::
]]></format>
</remarks>
<altmember cref="T:System.Web.Management.WebThreadInformation" />
</Docs>
</Member>
</Members>
</Type>