こんにちは私は、App_Dataフォルダにファイルを書き込むASP.NET(ウェブサイト)プロジェクトのページを持っています。
私のブラウザからページをリクエストすると、すべてが動作します。
私は私のプロバイダからのcronジョブスケジュールされたジョブからこの要求を実行すると、私は次のようなエラーに
リクエストがスケジューラから来たときにApp_Dataに書き込めません。
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()
を取得誰も私を助けることができますか?
cron jonは別のホスト/ドメイン上でasp.net Webサイトとして動作します。私はそれがただウェブ要求をすると仮定します。
スケジューラが別のサーバにある ブラウザからアクティブにすると、スケジューラと同じアクセス権があると思われますか、それとも異なるのでしょうか? –
私はそう思っていますが、プロセスですエクスプローラがその確認に役立ちます。あなたの前提が真実でないこのような場合は、基本に戻ってすべてを検証する必要があります。 – Richard