DsmlSoapConnection.EndSession Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

The EndSession method ends the session with the DSML server and clears the SessionId property.

Namespace:   System.DirectoryServices.Protocols
Assembly:  System.DirectoryServices.Protocols (in System.DirectoryServices.Protocols.dll)

	Unrestricted = true)]
public abstract void EndSession()

Exception Condition

Thrown when a communications failure occurs with the DSML server.


Thrown when there is no open session.

The method will block while waiting for a response from the DSML server and will timeout according to the Timeout property.

If the DSML server terminates the session, a WebException

is thrown. If SessionId is still valid after the exception is thrown, the request never reached the server and the connection is still considered valid.

.NET Framework
Available since 2.0
Return to top