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!
nahumba
nahumbaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vavjeevaCommented:
i belive u need to explictly grant permissions in the registry..
chk the below link here
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1502567&SiteID=1
http://petesbloggerama.blogspot.com/2008/01/fix-requested-registry-access-is-not.html
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.


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.