Error Provider::TranslateProvisioningError

Translates an MPF error raised by a calling procedure and uses a lookup file to translate it into a message that is more meaningful for the current context. For example, this procedure can be used to translate a potentially confusing low-level error to a friendly message. Used by Microsoft Provisioning Framework (MPF).

To remap errors with this procedure, create a separate XML lookup file for every language. The directory Microsoft Provisioning\Samples\SampleWebSite\StringCache\1033 (usually a subdirectory of Program Files) contains a template file, default_errors.xml. Alternately, you can use the format from the following example, which is excerpted from this file.

  <Item name="adduser|0x82101391">
	<message>Sample error message.</message>
  <Item name="createorg|0x82101001">
	<message>Another sample error message.</message>

Each Item node corresponds to one entry in the file. The name attribute expects data in the format error message context | source error code. The message and errorCode child nodes specify the translated error description and code, respectively. The message node can be an arbitrary string. The errorCode node specifies an HRESULT in either hexadecimal (0xFFFFFFFF) or decimal (+-9999999999) format.

After creating the new file, register it in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\Providers\Error Provider\RootFolder key.

Note When implementing the file, it is advisable to change the file name, file location, and registry key name to ones that are more meaningful and secure.

 Schema Definition
 Sample Code
 Applies To
 See Also