Back to product page

Export method


Exports all certificates into a file.

Type

A Certificate object. Full path to a file on local system.

Syntax

  • Basic
object.Export (Filename)
The Export(object,Filename) syntax has these parts:
objectAn expression evaluating to an object of type Certificates.
FilenameRequired. A String value. Path to a file where certificates are exported.

Remarks

Export method will create (or append if it already exists) file that contains X509 format of all certificates currently held in Certificates collection. Usually, these are certificates stored in windows certificate store. Primary purpose of this method is to be used with wodHttpDLX'es LocalCertBag property, in ASP. Since ASP components cannot access windows certificate store (due to permission issues), this method is provided so these certificates are exported to a file, and then loaded through appropriate method when required.

Usually, you can use code like this to export certificates (sample in VB):
 
Dim Loc As New CertLocation
Loc(CurrentUser).Item("ROOT").Export "C:\certs.txt"
Loc(CurrentUser).Item("CA").Export "C:\certs.txt"
 

as you can see, Certificates collection is accessed indirectly in above sample, through CertLocation object.

To import these certificates again to the collection, you can use Import method.

Platforms

Windows