Ask a question about WebForm to call external EXE program

xiaoxiao2021-03-06  57

Create an ASP.NET web application, activate a button on the web page to call an EXE from the disk

Preface, use the process. Also built a Windows application is also called an EXE, run

Through, the same code is not running when the ASP.NET application is placed. The code is as follows (C #):

ProcessStartInfo PSI = New ProcessStartInfo ("aa.exe", param;

Psi.RedirectStanderror = true;

Psi.useshellexecute = false;

psi.workingdirectory = str_path;

P.StartInfo = PSI;

p.Start ();

p.WaitForexit ();

Single-step debugging, report an error in P.Start ():

Description:

Unprocessed exceptions occur during the current web request. Check the stack tracking information to learn more about the error and the code caused in the code.

Abnormal details:

System.comPonentModel.Win32Exception: The system cannot find the specified file.

转载请注明原文地址:https://www.9cbs.com/read-113480.html

New Post(0)