DsmlSoapConnection.EndSession 方法

定义

EndSession() 方法结束与 DSML 服务器的会话并清除 SessionId 属性。The EndSession() method ends the session with the DSML server and clears the SessionId property.

public:
 abstract void EndSession();
public abstract void EndSession ();
abstract member EndSession : unit -> unit
Public MustOverride Sub EndSession ()

例外

当与 DSML 服务器之间的通信发生故障时,将引发此异常。Thrown when a communications failure occurs with the DSML server.

如果没有打开的会话,则引发该异常。Thrown when there is no open session.

注解

方法将在等待 DSML 服务器的响应时阻止,并将根据 Timeout 属性超时。The method will block while waiting for a response from the DSML server and will timeout according to the Timeout property.

如果 DSML 服务器终止会话, WebExceptionIf the DSML server terminates the session, a WebException

引发。is thrown. 如果在 SessionId 引发异常后仍然有效,则请求决不会到达服务器,并且连接仍被视为有效。If SessionId is still valid after the exception is thrown, the request never reached the server and the connection is still considered valid.

适用于