[
  {
    "Id": "1347136",
    "ThreadId": "578919",
    "Html": "Hello<br />\n<br />\nWhen I try to extract a zip file into the web content folder, I am getting this error.<br />\n<blockquote>\nSkin file extraction failed - Ionic.Zip.ZipException: Cannot extract ---&gt; System.IO.IOException: The process cannot access the file  '\\machinename\\sharedfolderName\\foldername\\Skins\\' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.OpenHandle(String path) at System.IO.Directory.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc) at Ionic.Zip.ZipEntry._SetTimes(String fileOrDirectory, Boolean isFile) at Ionic.Zip.ZipEntry.ValidateOutput(String basedir, Stream outstream, String&amp; OutputFile) at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)<br />\n--- End of inner exception stack trace --- at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)<br />\n</blockquote>\n\\machinename\\sharedfolderName\\folderName is web content folder. We have process extract the skin file into the above said folder through web application. <br />\n<br />\nHere's the code which extract the zip file.<br />\n<blockquote>\nusing (ZipFile zip1 = ZipFile.Read(stagingFilePath))<br />\n{<br />\nif (zip1.Count &gt; 0)<br />\n{<br />\n</blockquote>\n<pre><code>foreach (ZipEntry e in zip1)\n{\n    e.Extract(unpackDirectory, ExtractExistingFileAction.OverwriteSilently);\n}\nzip1.Dispose();\nerrorMessage = &quot;Style Sheet file uploaded and published successfully.&quot;;\nmessageType = INFORMATION;</code></pre>\n\n}<br />\n   else<br />\n   {<br />\n<pre><code>errorMessage = GetString(StringTokens.UploadStyleSheetZipFileIsEmpty, &quot;Zip file is empty&quot;);\nmessageType = ERROR;</code></pre>\n\n}<br />\n}<br />\n<br />\nThe error occurs at e.extract(unpackDirectory, ExtractExistingFileAction.OverwriteSilently); line, even when process run first time.  The path of unpackDirectory is __<strong>\\machinename\\sharedfolderName\\folderName</strong>.<br />\nThe following users has permission on the web content folder (APSNET, IIS_USR and everyone - Full permission). Still I get this error. <br />\n<br />\nAny help will be appreciated. <br />\n",
    "PostedDate": "2015-01-29T07:20:53.41-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]