Simon
Simon

Reputation: 99

Running command line app on asp.net server

I'm trying to get asp.net to run a console application on the server. I can get it to run with the following:

System.Diagnostics.ProcessStartInfo info = 
new System.Diagnostics.ProcessStartInfo(filePath, "");
Process processChild = Process.Start(info); 
info.CreateNoWindow = false;

What I need is for the console app window to appear. Currently it just runs as a process in the background.

Any ideas? Is this even possible?

Upvotes: 1

Views: 770

Answers (1)

Kangkan
Kangkan

Reputation: 15571

Nice, you are starting the process before setting CreateNoWindow to false. Do it like this instead:

System.Diagnostics.ProcessStartInfo info = 
new System.Diagnostics.ProcessStartInfo(filePath, "");
info.CreateNoWindow = false;
Process processChild = Process.Start(info); 

Upvotes: 1

Related Questions