Can't read remote registry key.

S

sergey.losyev

Hi, it's a small intranet webapp.

OpenRemoteBaseKey works fine, but on read-only OpenSubKey function I
get an error:
<Requested registry access is not allowed.>

On remote machine I set all Code Groups to Everything, Set all .NET
security to Full Trust and in Registry added "Everyone" with Full
Control to the key and I still can't get past the error! Please advise!

This is my function in webservice:

public bool Read_Key()
{

// Opening the registry key
RegistryKey rk =
RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine,"RDATABASE");

// Open a subKey as read-only
RegistryKey sk1 = rk.OpenSubKey(SOFTWARE\\TEST\Sample1);

// If the RegistrySubKey doesn't exist -> (null)
if ( sk1 == null )
return false;
try
{....



Sergey
 
S

sergey.losyev

I added <identity impersonate="true" userName="Admin" password="pass"
/> and it worked!

But why didn't all my loose permissions (posted above) work for
whatever default account asp.net uses to access remote registry?
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top