Share via


AuthenticationService.Logout 方法

定義

清除瀏覽器中的驗證票證 (Cookie)。

public:
 void Logout();
[System.ServiceModel.OperationContract]
public void Logout ();
[<System.ServiceModel.OperationContract>]
member this.Logout : unit -> unit
Public Sub Logout ()
屬性

備註

方法 Logout 會從瀏覽器的 Cookie 集合中清除驗證 Cookie。 使用者必須再次登入才能通過驗證。

類別 AuthenticationService 不會在已清除驗證票證的伺服器上儲存資訊。

注意

請勿從 Web 服務器上執行的程式碼呼叫 Logout 方法。 您只會呼叫 Logout 方法做為 WCF 服務的一部分。 如需詳細資訊,請參閱ASP.NET 驗證

適用於

另請參閱