Running Executable Files Over a Network

A

accyboy1981

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
 
J

John Saunders [MVP]

accyboy1981 said:
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?
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top