By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.GetCurre nt.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
Share this Question
Share on Google+
3 Replies


P: n/a

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_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.GetCurre nt.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

P: n/a
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********@yahoo.com> wrote in message
news:9f*************************@posting.google.co m...
| 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.GetCurre nt.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

P: n/a
Yeah, i understood, when i get the Identity name using the
System.Security.Principal.WindowsIdentity.GetCurre nt.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********@yahoo.com> wrote in message
news:9f*************************@posting.google.co m...
| 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.GetCurre nt.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 discussion thread is closed

Replies have been disabled for this discussion.