S
sxzy
Hi, I use OpenRemoteBaseKey to open HKLM key on remote machine in
same domain
Code fails on OpenSubKey with error "Requested registry key is not
allowed"
I tried to give permissions to everyone on that registry key, lowering
all .NET 1.1 permissions to full trust and to no avail. The only thing
that worked was:
<identity impersonate="true"/>
and it would work when ran only on my development machine, not on
others (with same security settings)
Please point me in the right direction.
Thx,
Sergey
Code:
string subkey= "SOFTWARE\\QAI\\Update SQL\\Update Config";
// Opening the registry key
RegistryKey rk =
RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine,"QDATABASE");
//fails qietly here
// Open a subKey as read-only
RegistryKey sk1 = rk.OpenSubKey(subkey); // exception here
same domain
Code fails on OpenSubKey with error "Requested registry key is not
allowed"
I tried to give permissions to everyone on that registry key, lowering
all .NET 1.1 permissions to full trust and to no avail. The only thing
that worked was:
<identity impersonate="true"/>
and it would work when ran only on my development machine, not on
others (with same security settings)
Please point me in the right direction.
Thx,
Sergey
Code:
string subkey= "SOFTWARE\\QAI\\Update SQL\\Update Config";
// Opening the registry key
RegistryKey rk =
RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine,"QDATABASE");
//fails qietly here
// Open a subKey as read-only
RegistryKey sk1 = rk.OpenSubKey(subkey); // exception here