Author: jessicah | Posted on: 6/24/2008 2:36:04 PM | Views : 359

Hi All,

I have seen a fair number of web-pages that discuss this error, but all of them relate to accessing the EventLog, which I don't think applies to me.

In my ASP.NET application, I'm trying to access the registry of a remote machine, with write access, using the following code:

1    using Microsoft.Win32;
2   
3    var remoteRegistry = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, computer.Name);
4    var myKey = remoteRegistry.OpenSubKey(@"SOFTWARE\MyKey", true);
I get the exception at line 4. I'm using IIS 7 on Vista SP1, with IIS running under the NETWORK SERVICE account. I had tried adding both the web server machine, and the NETWORK SERVICE accounts to access the LocalMachine registry key on the target machine ...

Go to the complete details ...