Running Executable Files Over a Network

Discussion in 'ASP .Net' started by accyboy1981, May 10, 2007.

  1. accyboy1981

    accyboy1981 Guest

    Hi,

    I'm creating a website that is required to run an executable file over
    a network. I'm currently using the System.Diagnostics namespace with
    code similar to this:

    Process p = new Process();

    p.StartInfo.FileName = "\\pc-name\\dir\\program-name.exe";

    p.Start();

    The above code does not work I'm assuming it is the Process doesn't
    have to access rights to the PC. I don't know how to assign these
    parameter, or if what I'm doing is even possible.

    Any help would be much appreciated.

    Thanks

    Simon
    accyboy1981, May 10, 2007
    #1
    1. Advertising

  2. "accyboy1981" <> wrote in message
    news:...
    > Hi,
    >
    > I'm creating a website that is required to run an executable file over
    > a network. I'm currently using the System.Diagnostics namespace with
    > code similar to this:
    >
    > Process p = new Process();
    >
    > p.StartInfo.FileName = "\\pc-name\\dir\\program-name.exe";
    >
    > p.Start();


    Where do you need to run this process? On the client or on the server?
    --
    John Saunders [MVP]
    John Saunders [MVP], May 10, 2007
    #2
    1. Advertising

  3. I suggest you use impersonation to have ASP.NET run under a different user
    account that has the necessary network access.
    At first, for testing purposes, I'd suggest you have it run under your user
    account since you know you have the required access to the folder.

    <!-- Web.config file. -->
    <identity impersonate="true" userName="Redmond\BillG" password="Melinda"/>

    Please note that this will then result in the referenced executable file to
    be retrieved from the specified network computer and run on the local web
    server.

    --
    I hope this helps,
    Steve C. Orr,
    MCSD, MVP, CSM, ASPInsider
    http://SteveOrr.net


    "accyboy1981" <> wrote in message
    news:...
    > Hi,
    >
    > I'm creating a website that is required to run an executable file over
    > a network. I'm currently using the System.Diagnostics namespace with
    > code similar to this:
    >
    > Process p = new Process();
    >
    > p.StartInfo.FileName = "\\pc-name\\dir\\program-name.exe";
    >
    > p.Start();
    >
    > The above code does not work I'm assuming it is the Process doesn't
    > have to access rights to the PC. I don't know how to assign these
    > parameter, or if what I'm doing is even possible.
    >
    > Any help would be much appreciated.
    >
    > Thanks
    >
    > Simon
    >
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider], May 10, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jane Davis

    Network Service account over network

    Jane Davis, Jun 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    443
    Kevin Spencer
    Jun 22, 2005
  2. Replies:
    7
    Views:
    6,706
    Alex Molochnikov
    Feb 23, 2005
  3. Replies:
    15
    Views:
    486
    Dave Thompson
    Aug 21, 2006
  4. Jason Cavett
    Replies:
    8
    Views:
    617
    Sanjay
    May 16, 2007
  5. RMurray

    ASP Executable over the network

    RMurray, Nov 17, 2005, in forum: ASP General
    Replies:
    3
    Views:
    110
    RMurray
    Nov 17, 2005
Loading...

Share This Page