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 该方法。 仅作为 WCF 服务的一部分调用 Logout 该方法。 有关详细信息,请参阅 ASP.NET 身份验证

适用于

另请参阅