We have an archive task that takes text files from a network path, puts them in a zip file, and writes that file to an \archive directory in the same network path. It deletes the text files upon completion.
The task runs and does everything it's supposed to do correctly. The problem is that it reports "Access to the path ... is denied" and shows the task, and therefore the job, as failed.
The log file is below, with internal information changed:
11/11/2011 12:54:54 PM Info Task started: Archive Client Text Files (140)
11/11/2011 12:54:56 PM Err Error in CompressZipFolder, ex: System.UnauthorizedAccessException: Access to the path '\\servername\it$\Files\Client\Archive\Client_20111111.zip' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Delete(String path)
at SevenZip.SevenZipCompressor.CompressFilesEncrypted(Stream archiveStream, Int32 commonRootLength, String password, String fileFullNames)
at SevenZip.SevenZipCompressor.CompressFilesEncrypted(String archiveName, Int32 commonRootLength, String password, String fileFullNames)
at SevenZip.SevenZipCompressor.CompressFiles(String archiveName, String fileFullNames)
11/11/2011 12:54:56 PM Info Task completed: Archive Client Text Files (140)