ConnectionSession ConnectionSession ConnectionSession ConnectionSession ConnectionSession Class


The ConnectionSession class is used to represent a connection to an access point established with AcquireConnectionAsync.

public : sealed class ConnectionSession : IClosable, IConnectionSession
struct winrt::Windows::Networking::Connectivity::ConnectionSession : IClosable, IConnectionSession
public sealed class ConnectionSession : IDisposable, IConnectionSession
Public NotInheritable Class ConnectionSession Implements IDisposable, IConnectionSession
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


ConnectionProfile ConnectionProfile ConnectionProfile ConnectionProfile ConnectionProfile

Retrieves the ConnectionProfile associated with the connection session.

public : ConnectionProfile ConnectionProfile { get; }
ConnectionProfile ConnectionProfile();
public ConnectionProfile ConnectionProfile { get; }
Public ReadOnly Property ConnectionProfile As ConnectionProfile
var connectionProfile = connectionSession.connectionProfile;
ConnectionProfile ConnectionProfile ConnectionProfile

The connection profile used to define the properties of the access point connection.


Close() Close() Close() Close() Close()

Closes the connection to the access point.

public : void Close()
void Close() const;
// This member is not implemented in C#
' This member is not implemented in VB.Net
// This member is not implemented in JavaScript


This method is used by UWP apps written in JavaScript. For apps written using the .NET Framework 4.5 in C# and VB.NET, the Close method is exposed as the Dispose method on the ConnectionSession. For apps written in C++, the this method is called when using the delete keyword on the object.

Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

// This member is not implemented in C++/CX
void Dispose()
Sub Dispose