PC Review


Reply
Thread Tools Rate Thread

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

 
 
HK
Guest
Posts: n/a
 
      1st Apr 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
 
      1st Apr 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)...
> 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
Rate This Thread
Rate This Thread:

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
Reading range w/ 255+ characters throws error jarabe28 Microsoft Excel Programming 4 14th Apr 2009 04:39 PM
Single Key Reading, NOT in reading pane cbeke Microsoft Outlook Discussion 1 15th Dec 2008 05:05 PM
If my System.IO.StreamWriter Write method throws "The specified network name is no longer available." and I try to Dispose or Close it in the finaly clause the close or dispose method just throws "The specified network name is no longe Daniel Microsoft Dot NET 3 8th Sep 2005 07:54 AM
If my System.IO.StreamWriter Write method throws "The specified network name is no longer available." and I try to Dispose or Close it in the finaly clause the close or dispose method just throws "The specified network name is no longe Daniel Microsoft Dot NET Framework 1 8th Sep 2005 04:11 AM
Reading registry key throws "Requested registry access is not allowed." HK Microsoft Dot NET Framework 0 1st Apr 2004 05:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:18 AM.