Reputation: 1152
I am using Process.Start to fire-and-forget a long running console application within my ASP.NET website. I'm wondering if there any any circumstances where something will terminate the whole process tree of the worker process and so terminate my console process too. (Apart from reboots/shutdowns of course!)
Upvotes: 1
Views: 181
Reputation: 6106
Sorry to dodge your question a bit here, but hopefully this will be useful. It should be pretty easy to test your theory merely by cycling the ASP.NET worker process either by touching the web.config or even recycling IIS itself. Either way, however, wrapping your console process in a Windows service or even launching it using Windows' built in scheduler would be far more stable and relatively simple to set up. This way you avoid the whole issue of launching a process from ASP.NET and thereby improve the security of your site to boot.
Upvotes: 1