read/write registry in windows server 2008 using web service

Dec 9 2010 1:59 AM
Hi, 
I create web service for Reading and writing the registry. It works fine in win-xp. But its not working when I published it in win-2008 server. It shows me http 500 error.

My Code is:

set Reg:
string key = @"SOFTWARE\Wow6432Node\MyCompany\MyProject\Settings";
            string valuename = "Allow";
            setRegistryValue(key, valuename, Value);
Get Reg:
string key = @"SOFTWARE\Wow6432Node\MyCompany\MyProject\Settings";
            string valuename = "Allow";
            return Convert.ToInt32(getRegistryValue(key, valuename));


Can any body please help me whats going on with win-2008 server

Thanks,
Murali krishna.

Answers (2)