0

While executing the following code I observe an error in the line

public static void WriteZipFile(List<string> filesToZip, string path, int compression)

Code :

using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using ICSharpCode.SharpZipLib.Checksums;
using ICSharpCode.SharpZipLib.Zip;

/* some code */

public static void WriteZipFile(List<string> filesToZip, string path, int compression)

/* some code */
Crc32 crc32 = new Crc32();
ZipOutputStream stream = new  ZipOutputStream(File.Create(path));
stream.SetLevel(compression);

Other info : Path = C:\\Users\\test\\Documents\\details\Local Code\\project\\projectwebsite\\PublishedSources\\

Error:

Could not find a part of the path 'C:\Users\test\Documents\details\Local Code\project\projectwebsite\PublishedSources\'.

H H
  • 263,252
  • 30
  • 330
  • 514
Free your mind
  • 47
  • 1
  • 1
  • 7
  • Well, does this path exists on the computer running this code? – Zohar Peled Mar 15 '15 at 09:51
  • yes this path exists. When i tried to create a file using this path i get the same error. Is this something to do with iisexpress ? – Free your mind Mar 15 '15 at 10:11
  • 1
    Menioning IisExpress presumably this code is in a website? Check the file system permissions the account the website is running under has on the folder you're attempting to access; generally websites are run under accounts with very limited file system permissions. – 9swampy Mar 15 '15 at 10:25

0 Answers0