Table A-9 shows the required RegistryPermission settings for system registry functions in .NET targets.
System function |
Permission required |
---|---|
RegistryGet, RegistryKeys, RegistryValues |
Read |
RegistrySet |
Write; if registry key does not exist, requires Create |
RegistryDelete |
Read and Write |
Table A-10 shows the required RegistryPermission settings for MLSync object functions in .NET targets.
MLSync 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 |
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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="HKEY_CURRENT_USER" />
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" />