473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

HKCU Registry Hive & ASP.NET impersonated application

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
Nov 18 '05 #1
1 1587
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 Dr****@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brian Campbell | last post by:
Gretings... I have written a Windows Service that accesses a Web Service. Both run fine on my development machine.... After installing both the Windows Service and Web Service on my staging...
21
by: Kevin Swanson | last post by:
I'm attempting some remote registry manipulation via C#. I've written a test app to simply grab a specified key from a specified hive on a specified machine. The call to OpenSubKey is throwing...
4
by: Viviana Vc | last post by:
Hi all, A Windows service (which obviously starts before any user logs in) is failing to: - read something from registry from a key under the HKCU - try to find out the user path by doing the...
3
by: techmaccoy | last post by:
I am trying to access a entry under HKEY_Current_USER/Software. In My code it List seven subkeys under there. Actually there are lot more and the entry i wanted to access in seen in the Registry,...
8
by: MSDN Account | last post by:
I have looked at the documentation for 'Microsoft.Win32.Registry' and 'System.Security.Permissions.RegistryPermission' but am still stuck, hoping some can give me a nudge in the right direction. ...
8
by: Shawn B. | last post by:
Greetings, I'm creating a little program that acts as a glorified Registry explorer. The TreeView doesn't allow you to show a plus sign unless a node has child nodes, so I need to determine...
2
by: Mr. Novice | last post by:
A co-worker and I are collaborating on a vb.net app that automates some of the processes our team uses. We wrote preferences for the application that are stored in the registry. Problem that the...
0
by: tmsprowl | last post by:
Greetings! I was wondering if someone could help me with a problem I'm having. My department is just one of many within my organization. My organization has control over the network domain,...
11
by: Unknown Hero | last post by:
Tim Golden wrote: The first link which points to the Python documentation for the _winreg module I already checked, even before coming here. I am wondering how I should do the loop I need (go...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.