Hello
I am having a problem when running a C# console application that refers to an unmanaged COM dll from a Scheduled Task.
Scenario 1:
Run the application directly from the installation folder
Result 1:
Applications completes successfully
Scenario 2:
Run the application from a scheduled task where 'Run only when user is logged on' selected
Result 2:
Application completes successfully
Scenario 3:
Run the application from a scheduled task where 'Run whether user is logged in or not' selected
(I am still logged in and am manually running by right-clicking the scheduled task and selecting 'Run')
Result 3:
FileNoteFoundException thrown for referenced COM dll, as below:
Application: ExcessPaymentUploader.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at Gelder.Exchequer.DataServices.ExchequerTransactionDataService.GetDebtorTransactionsYTD(System.String)
at ExcessPaymentUploader.Program.CreateExcessList()
at ExcessPaymentUploader.Program.Test()
at ExcessPaymentUploader.Program.Main(System.String[])
The console application is installed on a Server 2008 R2 box.
The required dll is under the same folder as the executable.
The dll is registered.
Has anyone come across this issue?
Thanks
Nick