| title | IAppHostPropertySchema::ValidationParameter Property |
|---|---|
| description | This article has information about syntax, return value, and requirements for the IAppHostPropertySchema::ValidationParameter property. |
| ms.date | 10/07/2016 |
| ms.assetid | 44cfa36d-c54d-3c23-6ca6-7509e9dfc8f4 |
Provides attribute-validation parameter information for the current property.
HRESULT get_ValidationParameter(
[out,
retval,
string] BSTR* pbstrValidationParameter
); pbstrValidationParameter
A pointer to a BSTR that contains the validation parameter.
An HRESULT. Possible values include, but are not limited to, those in the following table.
| Value | Description |
|---|---|
| S_OK | Indicates that the operation was successful. |
Attribute validation is performed when XML is parsed and when the API makes a call to set a value in the configuration system.
The following table provides the available validation types.
| Validation type | Description |
|---|---|
| applicationPoolName | Will fail validation if the property value contains any one of the following characters: |<>&\"The following example will cause validation failure if the property value includes one of the restricted characters. validationType="applicationPoolName"validationParameter="" |
| integerRange | Syntax: <minimum>,<maximum>[,exclude]Will fail validation if the property value is set to a value outside the specified range. The following example will cause validation failure if the property is set to a value less than 1 or larger than 10. validationType="integerRange"validationParameter="1,10,exclude" |
| nonEmptyString | Will fail validation if the property value is set to an empty string. The following example will cause validation failure if the property value is set to an empty string. validationType="nonEmptyString"validationParameter="" |
| siteName | Will fail validation if the property value contains any one of the following characters: /\.?The following example will cause validation failure if the property value includes one of the restricted characters. validationType="siteName"validationParameter="" |
| timeSpanRange | Syntax: <minimum>,<maximum>,<granularity>[,exclude]Will fail validation if the property value is set to a value outside the specified range. <granularity> indicates the increments that are allowed between <minimum> and <maximum>.The following example will cause validation failure if the property is set to a value less than 1, greater than 2592000, and is not an increment of 60 within the range. validationType="timeSpanRange"validationParameter="1,2592000,60" |
| requireTrimmedString | Will fail validation if white space is found at the start or end the property value. The following example will cause validation failure if the property value contains white space at the start or end of the value. validationType="requireTrimmedString"validationParameter="" |
| Type | Description |
|---|---|
| Client | - IIS 7.0 on [!INCLUDEwinvista] - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
| Server | - IIS 7.0 on [!INCLUDEwinsrv2008] - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
| Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 - [!INCLUDEiisexp75], [!INCLUDEiisexp80], [!INCLUDEiisexp100] |
| Header | Ahadmin.h |
IAppHostPropertySchema Interface
IAppHostPropertySchema::ValidationType Property