Re: Thread Unable to Impersonate (Workaround)
From: Tom Pester (tmspm_at_hotmail.com)
Date: 10/30/03
- Previous message: Dinis Cruz: ""Microsoft must deliver 'secure environments' not tools to write 'secure code'" : draft article"
- Maybe in reply to: Slezak: "Re: Thread Unable to Impersonate (Workaround)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 30 Oct 2003 01:42:35 +0100
I am not that good in asp.net but I think I have this problem too.
I started a seperate thread in an asp.net page which creates a file in a
folder.
The procudure that does this works fine in an asp.net page but fails in the
thread.
Is this persmission related and how can I give the thread more rights.
Tank you,
Tom
"Sam Page" <pages2@removespamalot.wyeth.com> wrote in message
news:311c01c3749d$baa2ba20$a001280a@phx.gbl...
> My ASP.NET aspx page can impersonate a userX and access a
> UNC share just fine.
>
> When I start a thread from the same aspx page, my real
> intention, and try to impersonate in the thread method, I
> fail with "Unable to Impersonate." The thread
> successfully calls LogonUser, DuplicateTokens the
> usertoken, creates a WindowsIdentity from the dupetoken,
> then fails on the call to WindowsIdentity.Impersonate( ).
> I have also tried ImpersonateLoggedOnUser.
>
> Workaround:
>
> If I change machine.config, processModel/@username
> from 'machine' to 'system', everything works.
>
> This is a workaround that leaves ASP.NET less secure. I'm
> trying to find a way to assign the correct privileges and
> associate the thread with the correct identity. No luck,
> looking for ideas. Thanks.
>
>
- Previous message: Dinis Cruz: ""Microsoft must deliver 'secure environments' not tools to write 'secure code'" : draft article"
- Maybe in reply to: Slezak: "Re: Thread Unable to Impersonate (Workaround)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|