MailBee.NET Objects 4.0

CertificateStore.SaveToFile Method 

Saves the certificate store into a file.

public bool SaveToFile(
   string filename,
   CertStoreFileType fileType,
   string pfxPassword
);

Parameters

filename
The filename of the file to be saved.
fileType
The format of the file store to be saved.
pfxPassword
PFX password to protect the store from unauthorized access, or a null reference (Nothing in Visual Basic) if fileType is not Pfx.

Return Value

true if the store was successfully saved to disk; otherwise, false.

Exceptions

Exception Type Condition
MailBeeInvalidArgumentException filename is a null reference (Nothing in Visual Basic).
MailBeeCertificateStoreWin32Exception Win32 returned an error on attempt to save the store to disk and ThrowExceptions is true.

Example

The example is available in AddCertificates topic.

See Also

CertificateStore Class | MailBee.Security Namespace | CertStoreFileType