LogonUser from ASP.NET

From: laimis (simulai_at_NOSPAMiit.edu)
Date: 01/25/05

  • Next message: Andy Mortimer [MS]: "RE: forms based authentication in mixed asp / asp.net environment"
    Date: Tue, 25 Jan 2005 10:37:39 -0600
    
    

    Hello everybody,

    this is rather complicated, but intriguing problem that I have been having.
    What I want to do is: after user connects to my asp.net application, I want
    to elevate the thread's user from ASPNET to let's say administrator so that
    priviledged operation could be performed. I don't want to change account
    under which ASP.NET runs. My idea is to impersonate in COM+ app that runs
    under priviledged account.

    Currently here is how I have it implemented.

    1. HttpModule intercepts the request for the application.
    2. Module calls COM+ app that runs with priviledged account
    3. COM+ app calls LogonUser to obtain security handle which later is used in
    creating windows identity and impersonaiting the identity, thus receiving
    context.
    4. Context is returned to the module
    5. Module uses it to assign to the current context of the executing thread

    All of the steps work just fine. I call LogonUser, I can see in the security
    log the succesful audit event. However, the context assigned doesn't make a
    difference to the running thread and the thread's user still returns ASPNET.

    Does anyone see a problem with my method?

    Thanks!

    Laimis


  • Next message: Andy Mortimer [MS]: "RE: forms based authentication in mixed asp / asp.net environment"

    Relevant Pages

    • Re: LogonUser from ASP.NET
      ... but intriguing problem that I have been having. ... Module calls COM+ app that runs with priviledged account ... Context is returned to the module ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Mighty Mouse: a step backwards for Apple
      ... I seldom use context menus. ... >> to app or even window to window. ... >> Otherwise, to me, it's just a kludge to make up for bad windows UI ... My hands are usually _on_ the keyboard, ...
      (comp.sys.mac.advocacy)
    • Re: How to pass Application.Item value back to class?
      ... Can't you pass the application settings as a parameter to ... As the context is entirely different(I mean the web context and your ... processing classes), or in other words,configuration is different from ... >>Suggestions please for strategy to share values across app. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Data loss appending data to file
      ... To put you in context, the app reads a text file one character at the time in binary mode and "emulates" the behavior of various line printers before storing the data of a printer page in a string array. ... Context switch back to Thread 1 which now executes the SetFilePointer() with the handle that now belong to Thread 2. ... I found the error by replacing all calls to the Windows API by library file access. ...
      (microsoft.public.win32.programmer.kernel)
    • Re: COM+ Singletons & instances ?
      ... or IIS App domain. ... Nothing in .Net is supposed to run inside the IIS Process ... As a library the ES component executes in the clients ... ServicedComponent are not intercepted at COM+ context ...
      (microsoft.public.dotnet.general)