471,086 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,086 software developers and data experts.

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

HK
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.
Nov 18 '05 #1
1 3179
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" <ju*******@yahoo.com> wrote in message
news:2e**************************@posting.google.c 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.

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Joao Santa Barbara | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.