• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2170
  • Last Modified:

Unable to read remote registry keys - asp.net & c#

Dear Experts!

I wrote a very simple web app which lists installed programs for a remote client (in the same domain) by reading the remote client's software section.

On my development machine (WinXP, visual web developer express 2008) - It works fine.
But, when I try to do the same thing on a Windows vista with IIS 7.0 - I get the following error:
"Requested registry access is not allowed".

I want to give my asp.net application administrative rights for the domain - but I don't know how to accomplish that on IIS 7.0

What are the steps required for this to work?
Thanks in advance!
1 Solution
i belive u need to explictly grant permissions in the registry..
chk the below link here
Download "subinacl" here. This is a command-line tool that enables administrators to obtain security information about files, registry keys, and services, and transfer this information from user to user, from local or global group to group, and from domain to domain.

There is a quick fix for this and any other permission issues that occur with Vista. I've seen this happen with several different installs under Vista including VS 2005 and Orcas. The problem is for some reason regisry permissions are given to the user msiserver. You can reset each entry manually, but that is a major pain. It's much easier just to fix the entire registry by using the SubInACL utility. Basically, you can use the utility to add administrator permissions to every key in the registry.
1. Download and install the SubInACL utility.

2.Create a new text file named fix_registry_permissions.cmd and add the following text to it and save it.

cd /d "%programfiles%\Windows Resource Kits\Tools"
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f

 3. Run the file by double-clicking on it.

That's it. It will take several minutes to finish, but at the end all registry keys will be accessable to the administrator and system, as it should be.


Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now