Console application not running through scheduler

  • Thread starter Thread starter Sumeet86
  • Start date Start date
S

Sumeet86

Guest

Hi All,

I have a C# console application that reads a file and load the same in oracle database. When i double click exe, it looks fine, however its giving me hard time when i run it thorugh scheduler. The following error getting captured in Event Viewer, when i run the task.


Application: XCOM__SQLLOAD_POSWEB.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.UnauthorizedAccessException

Stack:

at System.IO.__Error.WinIOError(Int32, System.String)

at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CommonInit()

at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.String, System.String, System.String, System.IO.SearchOption, System.IO.SearchResultHandler`1<System.__Canon>)

at System.IO.Directory.InternalGetFileDirectoryNames(System.String, System.String, System.String, Boolean, Boolean, System.IO.SearchOption)

at System.IO.Directory.GetFiles(System.String)

at XCOM__SQLLOAD_POSWEB.log.purgeOldInputFiles()

at XCOM__SQLLOAD_POSWEB.log.writetext(System.String)

at XCOM__SQLLOAD_POSWEB.Program.ParseNLoad()

at XCOM__SQLLOAD_POSWEB.Program.Main(System.String[])

Please let me know how can i resolve.


Continue reading...
 
Back
Top