I have a simple vb.net application. When I go to bin\debug\program.exe and double click the program runs perfect. The same program will not execute using task scheduler. When I create a scheduled task and click 'run' it just pops up a console window for a second, closes. Additionally, this same program used to run with task scheduler. One day, it just stopped working.
ps:
I have this program code managed in svn so I can safely say that the code has not changed.
The 0xe0434f4d exit code is quite meaningful. That's the native exception code for a managed exception. In other words, your app is crashing with an unhandled exception when it is run by task manager. I could guess at reasons why, but it is fairly pointless. Find out yourself, write an event handler for AppDomain.CurrentDomain.UnhandledException and log the value of e.ExceptionObject.ToString(). That gives you the exception message and the stack trace, almost always good enough to find out why it is bombing.
Personally I don't believe in magic :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With