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

H

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.
 
C

Cowboy \(Gregory A. Beamer\)

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!
**********************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top