WebAuthenticationSuccessAuditEvent.NameToAuthenticate 属性

定义

获取已验证身份的用户的名称。

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 SampleWebAuthenticationSuccessAuditEvent(
    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

注解

只有成功审核包括经过身份验证的用户的名称。 失败审核不包括用户名,因为它们通常是解密或验证失败造成的。

适用于

另请参阅