How to read (non-event log) registry keys as ASP .NET process

R

rhenders

Can someone please outline the required steps to allow the ASPNET user to
read selected registry keys? Here is what I've tried so far:

I've created (copied) the DPAPI implementation from MSDN into an assembly
called DataProtection. This works fine as long as the ASPNET process runs as
SYSTEM.

I've created a strong-name for DataProtection.dll and registered it in the
GAC.

I've created a key in HKLM\Software using Regedit(32) and granted the ASPNET
user access to it.

Regardless, I'm getting the following error:

System.Security.SecurityException: Requested registry access is not allowed.
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at ...

Thanks in advance.
 
R

rhenders

PS - just in case it's not obvious, I'm looking for a best practice and not a
solution that exposes ASPNET more than necessary.
 

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

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top