共用方式為


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

備註

只有成功稽核包含已驗證使用者的名稱。 失敗稽核不包含使用者名稱,因為它們通常是因為解密或驗證失敗所致。

適用於

另請參閱