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

T

techmaccoy

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, 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.WindowsIdentity.GetCurrent.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?
 
G

Guest

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
 
B

bruce barker

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)


| 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, 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.WindowsIdentity.GetCurrent.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?
 
T

techmaccoy

Yeah, i understood, when i get the Identity name using the
System.Security.Principal.WindowsIdentity.GetCurrent.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.
 

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,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top