Share via


IIsCertMapper.CreateMapping (ADSI)

The CreateMapping method of the IIsCertMapper (ADSI) object maps a certificate to a Windows account.

Syntax

IIsCertMapper.CreateMappingvCert, NtAcct, NtPwd, strName, IEnabled

Parameters
  • vCert
    Contains the certificate. The certificate is either a string or an array of bytes, usually obtained from the ClientCertificate collection of the built-in ASP Request Object.
  • NtAcct
    Contains the Windows account string.
  • NtPwd
    Contains the password string for NtAcct.
  • strName
    Contains the friendly name for the account.
  • IEnabled
    Specifies TRUE to enable the mapping, FALSE to disable the mapping.
Code Example
  <% 
  Dim CertObj, vCert 
  vCert = Request.ClientCertificate("CERTIFICATE") 
  Set CertObj = GetObject("IIS://..path../IIsCertMapper") 
  CertObj.CreateMapping vCert, "MYACCT", "MYPASS", "My Name", True 
%>