I need to start an application (a simple test.exe) from ASP.net core web application using ProcessStartInfo. The application starts using these parameters:
var startInfo = new ProcessStartInfo
{
FileName = "test.exe",
Arguments = string.Join("|", args),
Verb = "runas",
//UseShellExecute = false,
//WindowStyle = ProcessWindowStyle.Hidden,
//CreateNoWindow = true,
//RedirectStandardOutput = true,
};
The App test.exe starts and regularly works as far as the spawn application (the web app) is alive. As soon as the spawn WebApp dies, also the test.exe dies.
As you can see I tried many ProcessStartInfo params, but none of them solved the problem. The question is: Is it possible to launch a simple exe from inside a web app in .net core, and keep it alive independently from the spawn app? Environment is IIS ws2016