AuthenticationService.Logout 方法
定义
清除浏览器中的身份验证票证 (Cookie)。Clears the authentication ticket (cookie) in the browser.
public:
void Logout();
[System.ServiceModel.OperationContract]
public void Logout ();
[<System.ServiceModel.OperationContract>]
member this.Logout : unit -> unit
Public Sub Logout ()
- 属性
注解
Logout方法从浏览器的 cookie 集合中清除身份验证 cookie。The Logout method clears the authentication cookie from the browser's cookie collection. 用户必须再次登录才能进行身份验证。The user must log in again to be authenticated.
AuthenticationService类不会存储有关已清除了哪些身份验证票证的服务器上的信息。The AuthenticationService class does not store information on the server about which authentication tickets have been cleared.
备注
不要 Logout 从在 Web 服务器上执行的代码中调用方法。Do not call the Logout method from code that is executing on the Web server. Logout仅将方法作为 WCF 服务的一部分来调用。You call the Logout method only as part of a WCF service. 有关详细信息,请参阅 ASP.NET Authentication。For more information, see ASP.NET Authentication.