Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Reading registry key throws "Requested registry access is not allowed."

Reply
Thread Tools

Reading registry key throws "Requested registry access is not allowed."

 
 
HK
Guest
Posts: n/a
 
      04-01-2004
I am exceuting the following command in C#

using Microsoft.Win32;

RegistryKey key = Registry.LocalMachine.OpenSubKey(KeyName);

I keep getting the exception "Requested registry access is not
allowed."

If i give EVERYONE full access to the key , then i am able open the
key but i do not want to do that.
Please help.
 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-01-2004
Give the ASP.NET process access as well as the IUSR account. Either that or
assign a user for the thread before making the call.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"HK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I am exceuting the following command in C#
>
> using Microsoft.Win32;
>
> RegistryKey key = Registry.LocalMachine.OpenSubKey(KeyName);
>
> I keep getting the exception "Requested registry access is not
> allowed."
>
> If i give EVERYONE full access to the key , then i am able open the
> key but i do not want to do that.
> Please help.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem reading a registry key.. MSG Perl Misc 4 06-04-2006 10:51 PM
ASP.NET reading remote registry key sxzy@yahoo.com ASP .Net 0 05-03-2006 09:03 PM
How to read a registry key from Windows registry ? Leny Java 3 02-01-2005 07:54 AM
Replace Tab Key to Return Key (Enter Key) from Web Forms? M P ASP General 1 08-06-2004 08:32 AM



Advertisments