Re: Accessing network files from an external process

From: avnrao (avn_at_newsgroups.com)
Date: 05/10/04

  • Next message: TM: "<processModel>: Impersonation...?"
    Date: Mon, 10 May 2004 12:54:04 +0530
    
    

    when you impersonate the logged in user and access some external process,
    external process does not run under impersonated user. rather it runs under
    the configured identity (ASPNet account).

    you need to explicitly impersonate by calling LogonUser.
    check the code here :
    http://www.informit.com/articles/article.asp?p=169580&seqNum=2

    Av.

    "Raterus" <raterus@spam.org> wrote in message
    news:OZQMvuGNEHA.2532@TK2MSFTNGP10.phx.gbl...
    Here is a good problem I'm hoping someone can help me with. Let me start
    out with my configuration.

    I have an asp.net application, integrated windows authentication.
    Delegation is set up on my webserver to allow access to remote resources, it
    works great from within asp.net.

    I'm trying to work in an external command-line program, which will access
    files on the network. For this I'm using System.Diagnostics.Process. I'm
    positive I've set this up correctly to run the command, but the error I'm
    receiving from the program is that it can't open files that I'm setting in
    command line parameters. If I run the exact same command w/parameters by
    hand, it works great, and I know the files I'm specifying do infact exist.

    Sounds like a security problem to me, I have identity impersonate="true"
    set, also my Authentication mode is set to "Windows" in web.config.

    How can I allow this external process to execute under the same context as
    my authenticated user, so this process can access any network files my
    asp.net application can?

    Thanks for any help!
    --Michael


  • Next message: TM: "<processModel>: Impersonation...?"

    Relevant Pages

    • Re: system call of cadence in c++
      ... better ways of starting external programs and taking care of the output ... If you want to control some cadence tool from the command line, ... is actually better to have dfii start an external process and then you ... can set up communication between that process and dfii. ...
      (comp.cad.cadence)
    • Re: Ffidl::callback 3rd party dll.
      ... The external process thing wouldn't really work anyways with this. ... You give the learn command a callback function by address, so it needs to be in the same process. ... if {$instance abort} ...
      (comp.lang.tcl)
    • Re: Execute command of OS
      ... You execute an external process using the Process class. ... The example you use DO NOT WORK though, as cls is an internal command of the ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Start an external application - How?
      ... system seems to want the external process to complete before continuing. ... exec seems to wait for completion of the external process as well. ... I need to start an external process and then go on to the next command without waiting for the external process to complete. ... Start up each process in a thread and when your at a port that you need to do something after the processes have completed wait for the threads to complete and continue. ...
      (comp.lang.ruby)
    • Re: Start an external application - How?
      ... David Jones wrote: ... system seems to want the external process to complete before continuing. ... exec seems to wait for completion of the external process as well. ... need to start an external process and then go on to the next command ...
      (comp.lang.ruby)