Hello I have a page in an ASP.NET (website) project that writes a file to the App_Data folder.
When I request the page from my browser everything works.
When I perform this request from a cron-job scheduled job from my provider I get the following error
Could not find a part of the path 'C:\xxxxxxxxxxxxxxx\App_Data\Art_P00004.txt'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at System.IO.File.CreateText(String path)
at AanbiedingProcessor.DoWriteFiles()
at TskSendAanbiedingen.DoWork()
Can anyone help me ?
The cron jon runs on another host/domain as the asp.net website. I assume it just makes a web request.