Friday, October 7, 2011

Starting an EXE process from ASP.NET server hangs on Windows Server

When you start an executable EXE or BAT/CMD file via Process.Start in Windows Server and .NET 2.0-4.0 you will get an error "The application failed to initialize properly (0xC0000142). Click on OK to terminate the application".
Actual reason is pretty weird for me but a workaround is to use WMI Win32_Process instead of .NET Process.Start to execute a process. See RunWMI here as an example.

No comments: