HKCU Registry Hive & ASP.NET impersonated application

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9iZXJ0IERyb3pkeg==?=, Jul 29, 2004.

  1. 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
     
    =?Utf-8?B?Um9iZXJ0IERyb3pkeg==?=, Jul 29, 2004
    #1
    1. Advertising

  2. 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:...
    > 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
    >
    >
     
    Nicole Calinoiu, Jul 29, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. \Rob\
    Replies:
    0
    Views:
    430
    \Rob\
    May 10, 2004
  2. Adrian Bezzina
    Replies:
    0
    Views:
    403
    Adrian Bezzina
    Jan 18, 2005
  3. Mat

    How can you hive

    Mat, Dec 11, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    307
    Marina Levit [MVP]
    Dec 11, 2006
  4. Mark Sizzler
    Replies:
    0
    Views:
    908
    Mark Sizzler
    Jun 1, 2009
  5. Karim
    Replies:
    7
    Views:
    233
    Karim
    Sep 4, 2003
Loading...

Share This Page