Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > How to read (non-event log) registry keys as ASP .NET process

Reply
Thread Tools

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

 
 
rhenders
Guest
Posts: n/a
 
      10-07-2005
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.
 
Reply With Quote
 
 
 
 
rhenders
Guest
Posts: n/a
 
      10-07-2005
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.

"rhenders" wrote:

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

 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
read registry keys Vlatko Duvnjak C++ 2 04-08-2006 02:41 PM
read registry keys Borka Javascript 1 09-03-2004 11:35 AM



Advertisments