I have a console application which acts as a service for my ASP.NET application. I want to make sure that service is running when the web-app starts. Note this code checks and kills any previously running processes.
protected void Application_Start()
var svc = "C:\stuff\myService.exe";
if (isRunning(svc))
KillProcess(svc);
ProcessStartInfo psi = new ProcessStartInfo(svc);
Process.Start(psi);
When I run this from the debugger, I get a console window and I can see my output. However when I deploy the app to IIS and run it, no window -- yet I can see the process is running from task explorer as well as I'm getting expected results.
Is it possible to start the console application in it's own window on the IIS machine when Application_Start
fires up?