WebAuthenticationFailureAuditEvent.NameToAuthenticate 属性      
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取要验证的用户名。
public:
 property System::String ^ NameToAuthenticate { System::String ^ get(); };
	public string NameToAuthenticate { get; }
	member this.NameToAuthenticate : string
	Public ReadOnly Property NameToAuthenticate As String
	属性值
要验证的用户名。
示例
下面的代码示例演示如何使用 NameToAuthenticate 属性。
// Invoked in case of events identified by their event code.and 
// event detailed code.
public SampleWebAuthenticationFailureAuditEvent(
    string msg, object eventSource,
    int eventCode, int detailedCode, string userName):
base(msg, eventSource, eventCode, detailedCode, userName)
{
    // Perform custom initialization.
    customCreatedMsg =
    string.Format("Event created at: {0}",
        DateTime.Now.TimeOfDay.ToString());
}
' Invoked in case of events identified by their event code.and 
' event detailed code.
Public Sub New(ByVal msg As String, ByVal eventSource As Object, _
ByVal eventCode As Integer, ByVal detailedCode As Integer, _
ByVal userName As String)
    MyBase.New(msg, eventSource, eventCode, _
    detailedCode, userName)
    ' Perform custom initialization.
    customCreatedMsg = _
    String.Format( _
    "Event created at: {0}", DateTime.Now.TimeOfDay.ToString())
End Sub
	注解
只有成功的审核应包括经过身份验证的用户的名称。 失败审核不应包含用户名,因为它们通常是解密或验证失败导致的。