HKCU Registry Hive & ASP.NET impersonated application

G

Guest

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
 
N

Nicole Calinoiu

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
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top