Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- From: "Simon Hart" <srhartone@[no spam]yahoo.com>
- Date: Wed, 15 Mar 2006 16:57:48 -0000
Hi Willy,
Is this true even though impersonation is used? and the user is
authenticated correctly?
Regards
Simon.
"Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
news:OPIw8oESGHA.776@xxxxxxxxxxxxxxxxxxxxxxx
Ignacio is right, web services or web applications do load a profile, the
HKCU is pointing to the default profile of the IIS user ('localsystem' for
IIS5.x or 'network user' for IIS6). That means that HKCU is mapped to
HKU\.default on XP/W2K or HKU\S-1-5-19 on W2K3.
Willy.
"Simon Hart" <srhartone@[no spam]yahoo.com> wrote in message
news:uli%23j4DSGHA.4900@xxxxxxxxxxxxxxxxxxxxxxx
| Hi,
|
| I thought this *might* be the case. When I check the user identity using
| WindowsIdentity class, the user is the local Administrator account. The
key
| was installed via an install set which was installed under the local
| Administrator account.
|
| How do I do a real impersonate then, is it not possible to read a
| *non-windows* key in HKEY_CURRENT_USER via a Web service?
|
| I know this works if running under a Serviced Component. What I might
have
| to do as a work around, is hand off control to the Serviced Component to
do
| the work, reading registry etc.
|
| Florida - what a fine place btw - I learned to skydive there in 2004 at
| DeLand.
|
| Cheers
| Simon.
|
| "Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote
| in message news:uQ4wJRDSGHA.5924@xxxxxxxxxxxxxxxxxxxxxxx
| > Hi,
| >
| > IIRC CURRENT_USER refer to the user currently logged in the computer ,
| > your service does not has this info associated
| >
| >
| > --
| > Ignacio Machin,
| > ignacio.machin AT dot.state.fl.us
| > Florida Department Of Transportation
| >
| > "Simon Hart" <srhartone@[no spam]yahoo.com> wrote in message
| > news:epF$rwCSGHA.6084@xxxxxxxxxxxxxxxxxxxxxxx
| >> Hi,
| >>
| >> I am using Impersonation and turned off anon access for my web
service.
I
| >> am
| >> using the administator to authenticate the request using
ICredentials.
I
| >> am
| >> simply trying to read a key in HKEY_CURRENT_USER from my Web Service
| >> method
| >> call which I am unable to. When I try and open it it returns null.
Even
| >> iterating all keys under HKEY_CURRENT_USER only returns a handful of
| >> keys.
| >>
| >> I can happily read any key under HKEY_LOCAL_MACHINE. I have checked
the
| >> identity of the user and it is definately running under the local
| >> administrator.
| >>
| >> Any ideas what to check would be great.
| >> Regards
| >> Simon Hart.
| >>
| >>
| >
| >
|
|
.
- Follow-Ups:
- Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- From: Willy Denoyette [MVP]
- Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- References:
- Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- From: Simon Hart
- Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- From: Simon Hart
- Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- From: Willy Denoyette [MVP]
- Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- Prev by Date: Re: Large Object Heap Compaction in Framework 1.1/2.0?
- Next by Date: Re: Converting ushort? to ushort
- Previous by thread: Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- Next by thread: Re: Reading keys from HKEY_CURRENT_USER from an impersonated Web Service
- Index(es):
Relevant Pages
|