[The Add method is available for use in the operating systems specified in the Requirements section. Instead, use the X509Store Class in the System.Security.Cryptography.X509Certificates
The Add method adds a
Certificate object to an open certificate store. This method can only be used with a store that has been opened with read/write permission.
ByVal Certificate _
- Certificate [in]
Expression that resolves to a Certificate object to be added to the store.
This method does not return a value.
Important When this method is called on a system store from a web script, the script needs to access digital certificates on the local computer. If you allow the script to access your digital certificates, the website from which the script is run will also gain access to any personal information stored in the certificates. The first time this method is called from a particular domain, a dialog box is generated in which the user must indicate whether access to the certificates should be allowed.
If the store is not open in read/write mode, this method fails. Although this method can be used with memory stores, any changes made to a memory store are not persisted when the store is closed.
If the certificate being added to the store is the same as one that is already there, the Add method deletes the existing certificate from the store and then adds the new certificate. The new certificate inherits properties from the existing certificate.
CAPICOM 2.0 or later on
Windows Server 2003 and Windows XP