3.1.4.1.3 SetMetadata (Opnum 5)
The SetMetadata method is received by the server in an RPC_REQUEST packet. In response, the administration system implementation changes its behavior as specified by the provided metadata. This method is the opposite of the GetMetadata method, which retrieves a specified behavior property of the administration system. SetMetadata sets a specified behavior property of the administration system.
This method is used to set a metadata property.
-
HRESULT SetMetadata( [in] BSTR bstrMetadataType, [in] VARIANT value );
bstrMetadataType: The name of the metadata property to set. Valid names are as follows.
-
Value
Meaning
"pathMapper"
Sets the IAppHostPathMapper object, which is a user-provided object that controls how the implementation of the administration system maps a specific path hierarchy to actual resources.
"pathMapper2"
Sets the IAppHostPathMapper2 object, which is a user-provided object that controls how the implementation of the administration system maps a specific path hierarchy to actual resources.
"changeHandler"
Sets the IAppHostChangeHandler object, which is a user-provided object that receives notification when the administration system detects that a part of the path hierarchy has changed.
"ignoreInvalidAttributes"
Sets the flag that controls whether the administration system will ignore certain types of errors when evaluating the IAppHostProperty part of an IAppHostElement. If the flag is true, the administration system ignores these errors. If the flag is false, the administration system treats these IAppHostProperty errors as fatal and invalidates the IAppHostElement container.
bool
"ignoreInvalidRanges"
Sets the flag that controls whether the administration system will ignore certain range validation errors when it evaluates the IAppHostProperty part of an IAppHostElement. If the flag is true, the administration system ignores these errors. If the flag is false, the administration system treats these IAppHostProperty errors as fatal and invalidates the IAppHostElement container.
bool
"ignoreInvalidDecryption"
Sets the flag that controls whether the administration system will ignore decryption errors when evaluating the IAppHostProperty part of an IAppHostElement. If the flag is true, the administration system ignores these errors. If the flag is false, the administration system treats these IAppHostProperty errors as fatal and invalidates the IAppHostElement container.
bool
"expandEnvironmentStrings"
Sets the flag that controls whether the administration system will expand environment variables when parsing the configuration system. If the flag is true, the administration system expands the variables. If the flag is false, the administration system does not expand the variables.
bool
"disableExtensions"
Sets a flag that determines whether the administration system supports custom server-side extensions that can extend how the system evaluates IAppHostElement objects. If true, the system will not support custom server-side extensions. If false, the system will support custom server-side extensions.
bool
"hideExceptionPhysicalPath"
Sets the flag that controls whether the administration system will give information about the physical path of the configuration file in exception messages. If the flag is true, the administration system hides the physical path. If the flag is false, the administration system returns the physical path.
bool
"lockMetadata"
Sets the flag that controls whether metadata can be modified with the SetMetadata call. If the flag is true, then further calls to SetMetadata will fail with a locking violation. If the flag is false, SetMetadata calls are allowed.
bool
value: The value of the metadata property to set.
Return Values: The server MUST return zero if it successfully processes the message that is received from the client. If processing fails, the server MUST return a nonzero HRESULT code as defined in [MS-ERREF]. The following table describes the error conditions that MUST be handled and the corresponding error codes. A server MAY return additional implementation-specific error codes.
-
Return value/code
Description
0X00000000
NO_ERROR
The operation completed successfully.
0X80070057
ERROR_INVALID_PARAMETER
One or more parameters are incorrect or null.
0X80070021
ERROR_LOCK_VIOLATION
Metadata property cannot be set because the lockMetadata property is set to true.
0X80070032
ERROR_NOT_SUPPORTED
The request is not supported because bstrMetadataType is not one of the supported metadata properties.
0X00000008
ERROR_NOT_ENOUGH_MEMORY
Not enough memory is available to process this command.