Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HKCU Registry Hive & ASP.NET impersonated application

Reply
Thread Tools

HKCU Registry Hive & ASP.NET impersonated application

 
 
=?Utf-8?B?Um9iZXJ0IERyb3pkeg==?=
Guest
Posts: n/a
 
      07-29-2004
Hello everybody!

There are many posts here concerning registry access and some derived problems.
I couldn't find however any simple answer to this basic question:

How can an impersonifited ASP.NET application access the HKCU registry hive of the user on whose behalf it runs?

It is obvious that that hive is not automatically loaded, thus what method does Microsoft recommend to load it so that my APS application can refer to HKCU?

I am using a third-party DLL (.NET) which keeps some data in the registry on per-user basis and I cannot change this design. That DLL works perfectly for its authors because they build desktop applications.

Any help, hints and ideas appreciated
Robert Drozdz


 
Reply With Quote
 
 
 
 
Nicole Calinoiu
Guest
Posts: n/a
 
      07-29-2004
Robert,

HKCU will not be populated for your target user because the execution
context is a service. This will continue to be a problem regardless of
whether you authenticate the user via IIS or ASP.NET.

Instead of trying to get the data out of HKCU, have you considered trying
to read for HKU? See http://www.codeproject.com/dotnet/ntsecuritynet.asp
for help on mapping the WindowsIdentity token to an SID string for use in
identifying the correct subky of HKU.

HTH,
Nicole


"Robert Drozdz" <Robert > wrote in message
news:BC37E0EE-9BFF-4E95-AA94-...
> Hello everybody!
>
> There are many posts here concerning registry access and some derived
> problems.
> I couldn't find however any simple answer to this basic question:
>
> How can an impersonifited ASP.NET application access the HKCU registry
> hive of the user on whose behalf it runs?
>
> It is obvious that that hive is not automatically loaded, thus what method
> does Microsoft recommend to load it so that my APS application can refer
> to HKCU?
>
> I am using a third-party DLL (.NET) which keeps some data in the registry
> on per-user basis and I cannot change this design. That DLL works
> perfectly for its authors because they build desktop applications.
>
> Any help, hints and ideas appreciated
> Robert Drozdz
>
>



 
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
Problem on Windows XP Pro x64Bit and System Registry Hive file. Horsepower Windows 64bit 7 02-06-2010 06:14 PM
How to create new Registry node AND value NOT in HKCU\Software\Javasoft\Prefs ? Mark Sizzler Java 0 06-01-2009 06:44 AM
SOLUTION: Corrupted SYSTEM hive in Registry WinXP_Powered A+ Certification 7 03-13-2006 03:15 AM
IWAM_machinename account registry hive remains loaded evan after IISReset \Rob\ ASP .Net 0 05-10-2004 02:06 PM
Registry access permission doesn't obey impersonated user Karim ASP .Net Security 7 09-04-2003 10:27 PM



Advertisments