CertificateLoadFromFileAsync Method

Namespace: MailBee.Security
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public static Task<Certificate> LoadFromFileAsync(
	string filename,
	CertFileType fileType,
	string pfxFilePassword
)

Parameters

filename
Type: SystemString
The path to the certificate file.
fileType
Type: MailBee.SecurityCertFileType
The certificate file type.
pfxFilePassword
Type: SystemString
The .PFX (.P12, PKCS #12) file password, or a null reference (Nothing in Visual Basic) if fileType is not Pfx.

Return Value

Type: TaskCertificate
A task that represents the asynchronous operation. The value of TResult parameter is the Certificate object.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionfilename is a null reference (Nothing in Visual Basic) or an empty string.
MailBeeIOExceptionThe specified file can not be opened or read.
MailBeeCertificateParsingExceptionfilename does not designate the certificate of the specified type.
MailBeeCertificateWin32ExceptionWin32 returned an error during processing the certificate data.
MailBeeLicenseExceptionMailBee.NET Security Powerup not licensed.
See Also