Dynamically changes the certificate to be used.

Namespace:  Microsoft.Rtc.Collaboration
Assembly:  Microsoft.Rtc.Collaboration(in Microsoft.Rtc.Collaboration.dll)

Syntax

Visual Basic (Declaration)
Public 
Function 
BeginChangeCertificate ( _
	
certificate 
As 
X509Certificate, _
	
userCallback 
As 
AsyncCallback, _
	
state 
As 
Object _
) 
As 
IAsyncResult
C#
public 
IAsyncResult 
BeginChangeCertificate(
	
X509Certificate 
certificate,
	
AsyncCallback 
userCallback,
	
Object 
state
)
Visual C++
public:
IAsyncResult^ 
BeginChangeCertificate(
	
X509Certificate^ 
certificate, 
	
AsyncCallback^ 
userCallback, 
	
Object^ 
state
)
JavaScript
function 
beginChangeCertificate(
certificate, 
userCallback, 
state);

Parameters

certificate
Type: X509Certificate
The new certificate.
userCallback
Type: AsyncCallback
The method to be called when the asynchronous operation is completed.
state
Type: Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Remarks

This requires the platform to stop listening, change the certificate, and start listening again. While this does not affect existing connections, the application should expect that there could a temporary problem in accepting new incoming connections.

Exceptions

Exception Condition
InvalidOperationException Thrown when the platform has not been configured with MTLS.
InvalidOperationException Thrown when the platform is not in the correct state to change the certificate.
ArgumentNullException Thrown when one or more of the arguments are null.
Microsoft.Rtc.Signaling . . :: . TlsFailureException Thrown when the certificate is invalid or otherwise unusable.

See Also