PrivateKey.Delete method
[The Delete method is available for use in the operating systems specified in the Requirements section. Instead, use the X509Certificate2.PrivateKey Property in the System.Security.Cryptography.X509Certificates namespace.]
The Delete method deletes the private key container referenced by the PrivateKey object.
Syntax
PrivateKey.Delete()
Parameters
This method has no parameters.
Return value
This method does not return a value.
Remarks
Important
This method deletes the private key container referenced by the PrivateKey object as well as all private keys in the container. Anything encrypted using the public keys corresponding to the deleted private keys will no longer be able to be decrypted.
This method raises CAPICOM_E_NOT_ALLOWED when it is scripted from a web-based application.
Requirements
Requirement | Value |
---|---|
Redistributable |
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP |
DLL |
|