Re: Impersonation
From: Trevor Lawrence (TrevorL@ise.canberra.edu.au)
Date: 12/18/02
- Next message: Larry Hastings: "Re: Impersonation"
- Previous message: Mike Moore [MS]: "Re: How Bad Is It?"
- In reply to: Larry Hastings: "Re: Impersonation"
- Next in thread: Larry Hastings: "Re: Impersonation"
- Reply: Larry Hastings: "Re: Impersonation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Trevor Lawrence" <TrevorL@ise.canberra.edu.au> Date: Thu, 19 Dec 2002 09:58:39 +1100
Quite simple really. When machine.config says "System" the app works. When
set to "machine" it prangs with "unable to impersonate".
This is what the app does:
The app is set in web.config to impersonate a particular account which has
privileges needed by the app. That's fine. (Authorization settings control
who can run the app.) The app, however, needs to start a separate thread.
When you do that the new thread starts in the ASPNET context (or the SYSTEM
context depending on the machine.config setting). What I want to do is now
programatically make this thread impersonate the same user the app is
running under. This is done by taking the token from the app's
WindowsIdentity, passing this to the thread which then uses it in the
impersonate call - which then succeeds or fails as indicated above.
Anyway, I shall do some more poking about.
Trevor
"Larry Hastings" <greg.@remove-me.unixsucks.com> wrote in message
news:usWQb4kpCHA.2772@TK2MSFTNGP09...
> What seems to be the problem?
>
> Trevor Lawrence wrote:
> >> You're right. One was set to "machine", the other "System". Now
> >> all I have to do is to work out how to achieve what I want without
> >> using "System" :-)
> >>
> >> Trevor
> >>
> >> "Larry Hastings" <greg.@remove-me.unixsucks.com> wrote in message
> >> news:e41eXAjpCHA.2388@tk2msftngp13...
> >>> Compare process model section in machine.config on both machines
> >>>
> >>> Trevor Lawrence wrote:
> >>>>> I have an ASP.NET app that needs to start a thread and
> >>>>> Impersonate. This is workinh fine on a Win2K server, but when I
> >>>>> move it onto my local XP workstation the Impersonate call fails
> >>>>> with an "unable to impersonate" error.
> >>>>>
> >>>>> What are the differences in rights assignments in the two OSes
> >>>>> that lets it work on one and not on the other? Or am I barking
> >>>>> up the wrong tree?
> >>>>>
> >>>>> Trevor Lawrence
> >>>>> School of Computing
> >>>>> University of Canberra
>
>
- Next message: Larry Hastings: "Re: Impersonation"
- Previous message: Mike Moore [MS]: "Re: How Bad Is It?"
- In reply to: Larry Hastings: "Re: Impersonation"
- Next in thread: Larry Hastings: "Re: Impersonation"
- Reply: Larry Hastings: "Re: Impersonation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|