Re: Thread Unable to Impersonate (Workaround)

From: Tom Pester (tmspm_at_hotmail.com)
Date: 10/30/03

  • Next message: Vijay Neelam: "Why save dialog displaying twise"
    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.
    >
    >


  • Next message: Vijay Neelam: "Why save dialog displaying twise"

    Relevant Pages

    • Thread Unable to Impersonate (Workaround)
      ... When I start a thread from the same aspx page, ... intention, and try to impersonate in the thread method, I ... This is a workaround that leaves ASP.NET less secure. ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Impersonate Thread with Domain ID in (ASP.NET)
      ... machine.config to make my application run under USER1. ... In aspx page, I am displaying windows identity, which displays ... When I start a new thread from aspx page, ... tried impersonate() method, ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Impersonation problem.
      ... When I enable impersonation in web.config and show User identity in .aspx ... it is the user IIS authenticates. ... But when I try to access Sql server, ... impersonate it at sql server side. ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Impersonation problem.
      ... When I enable impersonation in web.config and show User identity in .aspx ... it is the user IIS authenticates. ... But when I try to access Sql server, ... impersonate it at sql server side. ...
      (microsoft.public.dotnet.framework.aspnet.security)