-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
WebAuthenticationFailureAuditEvent.xml
195 lines (166 loc) · 14.5 KB
/
WebAuthenticationFailureAuditEvent.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
<Type Name="WebAuthenticationFailureAuditEvent" FullName="System.Web.Management.WebAuthenticationFailureAuditEvent">
<TypeSignature Language="C#" Value="public class WebAuthenticationFailureAuditEvent : System.Web.Management.WebFailureAuditEvent" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit WebAuthenticationFailureAuditEvent extends System.Web.Management.WebFailureAuditEvent" />
<TypeSignature Language="DocId" Value="T:System.Web.Management.WebAuthenticationFailureAuditEvent" />
<TypeSignature Language="VB.NET" Value="Public Class WebAuthenticationFailureAuditEvent
Inherits WebFailureAuditEvent" />
<TypeSignature Language="F#" Value="type WebAuthenticationFailureAuditEvent = class
 inherit WebFailureAuditEvent" />
<TypeSignature Language="C++ CLI" Value="public ref class WebAuthenticationFailureAuditEvent : 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 information about ASP.NET authentication failures.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following list describes the features for which <xref:System.Web.Management.WebAuthenticationFailureAuditEvent> events are raised by default by ASP.NET.
> [!NOTE]
> By default ASP.NET is configured to log audit failure conditions only, as logging success conditions can severely strain system resources. You can always configure the system to log the success conditions.
- Forms Authentication. While success audits include the user name that was authenticated; failure audits do not include the user name, since they typically result from a ticket that failed decryption or validation. Both contain the client IP address. The related event audit code is <xref:System.Web.Management.WebEventCodes.AuditFormsAuthenticationFailure>.
- Membership. Both success and failure audits contain the username that was attempted. Neither form of audit will contain the password that was attempted, because that would risk persisting a valid password in the log. The related event audit code is <xref:System.Web.Management.WebEventCodes.AuditMembershipAuthenticationFailure>.
When a <xref:System.Web.Management.WebAuthenticationFailureAuditEvent> is raised, by default it updates the Audit Authentication Failure Events Raised performance counter. To view this performance counter in System Monitor (PerfMon), in the **Add Counters** window select `ASP.NET` in the **Performance** object drop-down list, select the **Authentication Failure Events Raised** performance counter, and click the **Add** button. For more information, see [Using the System Monitor (PerfMon) with ASP.NET Applications](https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2003/cc784965(v=ws.10)).
> [!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. For an example of deriving from the <xref:System.Web.Management.WebAuthenticationFailureAuditEvent> class, see the example provided in this topic.
## Examples
The following code example shows how to use the <xref:System.Web.Management.WebAuthenticationFailureAuditEvent> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/CS/WebAuthenticationFailureAuditEvent.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/VB/WebAuthenticationFailureAuditEvent.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Web.Management.WebAuthenticationSuccessAuditEvent" />
<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>
</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.WebAuthenticationFailureAuditEvent" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal WebAuthenticationFailureAuditEvent (string message, object eventSource, int eventCode, string nameToAuthenticate);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor(string message, object eventSource, int32 eventCode, string nameToAuthenticate) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.WebAuthenticationFailureAuditEvent.#ctor(System.String,System.Object,System.Int32,System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, nameToAuthenticate As String)" />
<MemberSignature Language="F#" Value="new System.Web.Management.WebAuthenticationFailureAuditEvent : string * obj * int * string -> System.Web.Management.WebAuthenticationFailureAuditEvent" Usage="new System.Web.Management.WebAuthenticationFailureAuditEvent (message, eventSource, eventCode, nameToAuthenticate)" />
<MemberSignature Language="C++ CLI" Value="protected public:
 WebAuthenticationFailureAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, System::String ^ nameToAuthenticate);" />
<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="nameToAuthenticate" Type="System.String" />
</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 <see cref="T:System.Web.Management.WebEventCodes" /> value associated with the event.</param>
<param name="nameToAuthenticate">The name of the user to authenticate.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.Management.WebAuthenticationFailureAuditEvent" /> class with the specified event parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Management.WebAuthenticationFailureAuditEvent.%23ctor%2A> constructor is not intended to be used directly from your code. It is called by ASP.NET. You can call the <xref:System.Web.Management.WebAuthenticationFailureAuditEvent.%23ctor%2A> constructor when deriving from the <xref:System.Web.Management.WebAuthenticationFailureAuditEvent> class.
## Examples
The following code example shows how to customize this constructor.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/CS/WebAuthenticationFailureAuditEvent.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/VB/WebAuthenticationFailureAuditEvent.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal WebAuthenticationFailureAuditEvent (string message, object eventSource, int eventCode, int eventDetailCode, string nameToAuthenticate);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor(string message, object eventSource, int32 eventCode, int32 eventDetailCode, string nameToAuthenticate) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.WebAuthenticationFailureAuditEvent.#ctor(System.String,System.Object,System.Int32,System.Int32,System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer, nameToAuthenticate As String)" />
<MemberSignature Language="F#" Value="new System.Web.Management.WebAuthenticationFailureAuditEvent : string * obj * int * int * string -> System.Web.Management.WebAuthenticationFailureAuditEvent" Usage="new System.Web.Management.WebAuthenticationFailureAuditEvent (message, eventSource, eventCode, eventDetailCode, nameToAuthenticate)" />
<MemberSignature Language="C++ CLI" Value="protected public:
 WebAuthenticationFailureAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode, System::String ^ nameToAuthenticate);" />
<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="nameToAuthenticate" Type="System.String" />
</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="nameToAuthenticate">The name of the user to authenticate.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.Management.WebAuthenticationFailureAuditEvent" /> class with the specified event parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Management.WebAuthenticationFailureAuditEvent.%23ctor%2A> constructor is not intended to be used directly from your code. It is called by ASP.NET. You can call the <xref:System.Web.Management.WebAuthenticationFailureAuditEvent.%23ctor%2A> constructor when deriving from the <xref:System.Web.Management.WebAuthenticationFailureAuditEvent> class.
## Examples
The following code example shows how to customize this constructor.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/CS/WebAuthenticationFailureAuditEvent.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/VB/WebAuthenticationFailureAuditEvent.vb" id="Snippet3":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="NameToAuthenticate">
<MemberSignature Language="C#" Value="public string NameToAuthenticate { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string NameToAuthenticate" />
<MemberSignature Language="DocId" Value="P:System.Web.Management.WebAuthenticationFailureAuditEvent.NameToAuthenticate" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property NameToAuthenticate As String" />
<MemberSignature Language="F#" Value="member this.NameToAuthenticate : string" Usage="System.Web.Management.WebAuthenticationFailureAuditEvent.NameToAuthenticate" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ NameToAuthenticate { System::String ^ 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.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the user to authenticate.</summary>
<value>The name of the user to authenticate.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Only the success audits should include the name of the authenticated user. The failure audits should not include the user name, since they typically result from failed decryption or validation.
## Examples
The following code example shows how to use <xref:System.Web.Management.WebAuthenticationFailureAuditEvent.NameToAuthenticate%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/CS/WebAuthenticationFailureAuditEvent.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/system.web.management.WebAuthenticationFailureAuditEvent/VB/WebAuthenticationFailureAuditEvent.vb" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="T:System.Web.Management.WebAuthenticationFailureAuditEvent" />
<altmember cref="T:System.Web.Management.WebEventCodes" />
</Docs>
</Member>
</Members>
</Type>