473,789 Members | 2,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MVP's clarify - Registry List - Weird or Normal ???

I am trying to access a entry under HKEY_Current_US ER/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, but not
listed in my code.

I checked under the HKEY_USERS Key there are many users listed. and
each have a Software entry. The list i get through my ASPCode belongs
to one of the user.
But the entry i a m seeking is under a different User.

So i infered my aspcode is logged as a different user.
When I checked the identity in my code using
System.Security .Principal.Wind owsIdentity.Get Current.Name
I am getting the name as "MD".

When i checked the identity from a Windows application , i am getting
the same name "MD".
But when i access the registry through windows application , i am able
to list
the entry i wanted but thorugh ASPcode it is not showing the Entry?

Can anybody guide?
Nov 19 '05 #1
3 1533

Hi techmaccoy,

When you run a windows application, it runs with your account's cridentials,
so if you have access to the registry, your application will also have. On
the other hand, ASP.NET is different. What you get with WindowsIdentity is
the current authenticated user's context. On the otherhand, ASP.NET will
assume process identity and the authorization will be done accordingly to
that identity. (which is usually the ASPNET user account.) This means, the
account that the ASP.NET process uses will be forwarded for authorization
requests. Have you tried setting impersonation to true in web.config?

Ethem

"techmaccoy " wrote:
I am trying to access a entry under HKEY_Current_US ER/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, but not
listed in my code.

I checked under the HKEY_USERS Key there are many users listed. and
each have a Software entry. The list i get through my ASPCode belongs
to one of the user.
But the entry i a m seeking is under a different User.

So i infered my aspcode is logged as a different user.
When I checked the identity in my code using
System.Security .Principal.Wind owsIdentity.Get Current.Name
I am getting the name as "MD".

When i checked the identity from a Windows application , i am getting
the same name "MD".
But when i access the registry through windows application , i am able
to list
the entry i wanted but thorugh ASPcode it is not showing the Entry?

Can anybody guide?

Nov 19 '05 #2
nt services, like asp.net, don't have a user profile, so when they access
the registery, the user hive (HKEY_USERS) is meanless. the user hive is
mapped to the desktop owner's (current interactive user) security context.

-- bruce (sqlwork.com)
"techmaccoy " <te********@yah oo.com> wrote in message
news:9f******** *************** **@posting.goog le.com...
| I am trying to access a entry under HKEY_Current_US ER/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, but not
| listed in my code.
|
| I checked under the HKEY_USERS Key there are many users listed. and
| each have a Software entry. The list i get through my ASPCode belongs
| to one of the user.
| But the entry i a m seeking is under a different User.
|
| So i infered my aspcode is logged as a different user.
| When I checked the identity in my code using
| System.Security .Principal.Wind owsIdentity.Get Current.Name
| I am getting the name as "MD".
|
| When i checked the identity from a Windows application , i am getting
| the same name "MD".
| But when i access the registry through windows application , i am able
| to list
| the entry i wanted but thorugh ASPcode it is not showing the Entry?
|
| Can anybody guide?
Nov 19 '05 #3
Yeah, i understood, when i get the Identity name using the
System.Security .Principal.Wind owsIdentity.Get Current.Name i Am getting
the same User ID as i get from Windows application , but when I access
the registry the entry i am seeking is not listing.
.. I have entered impersonation =true, with the same ID as my Windows
login.
I have unchecked Anonymous Access also in IIS Config.
Is there a way to find from the registry key like
S-1-52-221-14230517432-321942672-3473557-1031 - Map to A User like
that, so that i can try to impersonate as the user under which i can
find the listing in the registry.
bruce barker wrote:
nt services, like asp.net, don't have a user profile, so when they access the registery, the user hive (HKEY_USERS) is meanless. the user hive is mapped to the desktop owner's (current interactive user) security context.
-- bruce (sqlwork.com)
"techmaccoy " <te********@yah oo.com> wrote in message
news:9f******** *************** **@posting.goog le.com...
| I am trying to access a entry under HKEY_Current_US ER/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, but not | listed in my code.
|
| I checked under the HKEY_USERS Key there are many users listed. and
| each have a Software entry. The list i get through my ASPCode belongs | to one of the user.
| But the entry i a m seeking is under a different User.
|
| So i infered my aspcode is logged as a different user.
| When I checked the identity in my code using
| System.Security .Principal.Wind owsIdentity.Get Current.Name
| I am getting the name as "MD".
|
| When i checked the identity from a Windows application , i am getting | the same name "MD".
| But when i access the registry through windows application , i am able | to list
| the entry i wanted but thorugh ASPcode it is not showing the Entry?
|
| Can anybody guide?


Nov 19 '05 #4

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

Similar topics

3
2620
by: Rohit Santhanam | last post by:
As I am reading the .NET documentation, I get the feeling that Microsoft is trying to get rid of the registry. My understanding is that an application built using .NET does not use the registry at all. So, conceivably as applications are migrated to .NET, the registry could disappear in a future version of Windows. Does anybody out there agree with me? Of course, they might keep the registry for backward compatibility purposes.
3
3718
by: Danny | last post by:
Hi I just have a quick question. One of our Windows based application uses the registry for configuration type options and some other things. I want to modify our application to move to use a XML file instead of the registry. The other engineer argues that it is faster and easier to manipulate the registry than File I/O operations with the XML file. I just wanted ask you guys what are the strengths and weaknesses with
6
1719
by: Steven Blair | last post by:
Hi, My C# app uses the registry for storing DB params, but under Windows XP SP2, a normal user cannot write to this key (a .NET exception is thrown when the app is run, but only under this OS). My question is, can a certain area of the registry get accessed by normal users. The key I am currently using is: SYSTEM\CurrentControlSet\Services\
6
16816
by: CMG | last post by:
I am writing a little code to associate an extention with my program. And as far as i can see, i need to do the following: Public Function associatefile(ByVal FILE_EXTENTION_TO_ASSOCIATE As String, ByVal FILE_EXTENTION_DESCRIPTION As String, ByVal EXE_NAME As String, ByVal DEFAULT_OPEN_COMMAND As String, ByVal DEFAULT_ICON As String, ByVal ACTION_NAME As String) Dim RegKey As RegistryKey RegKey = Registry.ClassesRoot.CreateSubKey
4
1389
by: Bob | last post by:
My question about how to add an assembly search path to VS.NET's IDE remains unanswered, but I'm still faced with a problem possibly associated with this: my exported registry is more than 67MB. This seems much too large to be normal, even for a developer's machine. I've read in places that "it's not recommended that you register assemblies in the GAC when developing addins", yet the instructions for adding a path the IDE configuration...
4
46483
by: LP | last post by:
Hi, My webservice is currently deployed on WIndows 2000 server and runs pretty fine. I am trying to run my webservice on a Windows 2003 server. My webservice tries to write to a eventlog. The code is as follows: System.Diagnostics.EventLog Log = new System.Diagnostics.EventLog( EventLogName ); Log.Source = EventLogName; Log.WriteEntry( "PCHistory Service Application started up successfully.",
6
1681
by: JOSII | last post by:
Getting a string of boolean value into and out of the registry is no problem. Here's the problem: Although you can place an object into the registry and retreive it, I need to place an ArrayList object with 10 string items into the registry and retreive them later. I tried this: key.SetValue("lstNSXitems", lstNSX.Items) where "lstNSXitems" is the name of the subkey, and lstNSX.Items is the
0
1962
by: Chris Mullins | last post by:
I have an application that installs some 64-bit binaries for development use in Visual Studio 2005. As such I want them to appear in the .Net References menu when someone attempts to "Add References" to their project. Doing this means (normally) writing to the registry key: HKLM\Software\Microsoft\.NetFramework\v2.0.50727\AssemblyFoldersEx\MyNewBinaries, with a default string value of C:\Program Files\MyBinaries.
1
2057
by: Chris Mullins | last post by:
I need to write to the 32-bit registry, and need to do so from a 64-bit MSI. It never occurred to me that this would be difficult... I have an application that installs some 64-bit binaries for development use in Visual Studio 2005. As such I want them to appear in the .Net References menu when someone attempts to "Add References" to their project. Doing this means (normally) writing to the registry key: ...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10142
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.