ICertificateEnrollmentServerSetup::SetProperty method (casetup.h)

The SetProperty method specifies a CESSetupProperty enumeration value for the Certificate Enrollment Web Service (CES) configuration.

Syntax

HRESULT SetProperty(
  [in] CESSetupProperty propertyId,
  [in] VARIANT          *pPropertyValue
);

Parameters

[in] propertyId

A CESSetupProperty enumeration value that specifies the property value to retrieve.

[in] pPropertyValue

A pointer to a VARIANT variable that contains the property value.

Return value

Return code Description
E_INVALIDARG
The propertyId argument is not a member of the CESSetupProperty enumeration type.

Also, if you are setting the ENUM_CESSETUPPROP_AUTHENTICATION property, you must specify one of the following values in the pPropertyValue argument:

  • X509AuthKerberos
  • X509AuthUsername
  • X509AuthCertificate
E_POINTER
The pPropertyValue parameter cannot be NULL.
HRESULT_FROM_WIN32(ERROR_INVALID_STATE)
The ICertificateEnrollmentServerSetup object has not been initialized.

The ErrorString property value is set to "The setup object has not been initialized. Please initialize the setup object with the InitializeInstallDefaults method."

HRESULT_FROM_WIN32(ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH)
If you are setting the ENUM_CESSETUPPROP_AUTHENTICATION property, the VARIANT subtype must be VT_I2, VT_I4, or VT_UI4.

Remarks

You must call InitializeInstallDefaults before calling SetProperty.

You cannot set the ENUM_CESSETUPPROP_URL property.

You cannot set the ENUM_CESSETUPPROP_USE_IISAPPPOOLIDENTITY if the WSEnrollmentServer application pool already exists and WMI has been initialized.

If you are setting the ENUM_CESSETUPPROP_AUTHENTICATION property, the VARIANT subtype must be VT_I2, VT_I4 or VT_UII4, and the pPropertyValue argument must be one of the following constants:

  • X509AuthKerberos
  • X509AuthUsername
  • X509AuthCertificate

You cannot set the ENUM_CESSETUPPROP_CACONFIG property if the target server is a standalone certification authority. The ErrorString property will be set to "The Certificate Enrollment Web Service cannot be used with a standalone certification authority (CA). It can only be used with an enterprise CA."

.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header casetup.h
DLL Certocm.dll

See also

ICertificateEnrollmentServerSetup