RegistryPermission settings are required for system registry functions and MLSync object functions in .NET targets.
Required RegistryPermission settings for system functionsSystem function |
Permission required |
RegistryGet, RegistryKeys, RegistryValues
|
Read
|
RegistrySet
|
Write; if registry key does not exist, requires Create |
RegistryDelete
|
Read and Write
|
This table shows the required RegistryPermission settings for MLSync object functions in .NET targets:
Required RegistryPermission settings for MLSync functionsMLSync function |
Permission required
|
GetObjectRevisionFromRegistry, GetsSyncRegistryProperties
|
Read on HKEY_CURRENT_USER registry key |
GetDBMLSyncPath
|
Read on the Software\Sybase\SQL Anywhere registry keys under HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE |
SetsSyncRegistryProperties
|
Unrestricted on HKEY_CURRENT_USER registry key |
Example 1
This example for a Windows Forms application grants read permission for the HKEY_CURRENT_USER registry key, which extends to its subkeys:
<IPermission class="System.Security.Permissions.RegistryPermission,
mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" version="1"
Read="HKEY_CURRENT_USER" />
Example 2
This example for a Web Forms application grants read permission for the HKEY_CURRENT_USER registry key, which extends to its subkeys:
<IPermission class="RegistryPermission" version="1
Read="HKEY_CURRENT_USER" />