I have a console program written in C# that I am using to send faxes. When I step through the program in Visual Studio it works fine. When I double click on the program in Windows Explorer it works fine. When I setup a Windows scheduled task to run the program it fails with this in the event log.
EventType clr20r3, P1 consolefaxtest.exe, P2 1.0.0.0,
P3 48bb146b, P4 consolefaxtest, P5 1.0.0.0, P6 48bb146b,
P7 1, P8 80, P9 system.io.filenotfoundexception,
P10 NIL.
I wrote a batch file to run the fax program and it fails with this message.
Unhandled Exception: System.IO.FileNotFoundException: Operation failed.
at FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer)
Can anyone explain this behavior to me?