ASP.NET reading remote registry key

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top