IWebSocketInformation2.ServerCertificate Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the certificate provided by the server when a secure WebSocket connection has been established.
public:
property Certificate ^ ServerCertificate { Certificate ^ get(); };
Certificate ServerCertificate();
public Certificate ServerCertificate { get; }
var certificate = iWebSocketInformation2.serverCertificate;
Public ReadOnly Property ServerCertificate As Certificate
Property Value
The server certificate.
Remarks
By the time the server certificate is available through this property, the SSL connection has already been established.
If you wish to inspect the server certificate during the connection process in order to perform custom validation, you should register a handler for the appropriate MessageWebSocket.ServerCustomValidationRequested or StreamWebSocket.ServerCustomValidationRequested event, and perform your custom server validation in that handler.
If you merely wish to ignore certain classes of error when the server certificate is validated (for example, you are using a self-signed certificate and wish to ignore the validation error caused by this condition) you can use the IgnorableServerCertificateErrors property to ignore the relevant classes of errors.