Visual Basic (Usage) | ![]() |
---|---|
Dim channel As ITransportChannel Dim configuration As ApplicationConfiguration Dim endpoint As ConfiguredEndpoint Dim clientCertificate As X509Certificate2 Dim availableEndpoints As EndpointDescriptionCollection Dim instance As New Session(channel, configuration, endpoint, clientCertificate, availableEndpoints) |
C# | |
---|---|
public Session( ITransportChannel channel, ApplicationConfiguration configuration, ConfiguredEndpoint endpoint, X509Certificate2 clientCertificate, EndpointDescriptionCollection availableEndpoints ) |
Parameters
- channel
- The channel used to communicate with the server.
- configuration
- The configuration for the client application.
- endpoint
- The endpoint use to initialize the channel.
- clientCertificate
- The certificate to use for the client.
- availableEndpoints
- Available endpoints.
The application configuration is used to look up the certificate if none is provided.
The clientCertificate must have the private key. This will require that the certificate
be loaded from a certicate store. Converting a DER encoded blob to a X509Certificate2
will not include a private key.
Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x