[
  {
    "Id": "249870",
    "ThreadId": "73141",
    "Html": "<p>I am fairly new to .net, and that's likely an understatement, as this is the first time I've really dug into it...</p>\r\n<p>I am trying to get this running on Windows Server 2008 64bit version and was wondering if anyone has had any trouble getting it working?</p>\r\n<p>If anyone has any experience they could pass to get it working be greatly appreaciated.</p>\r\n<p>Here is what I have done so far.</p>\r\n<p>- Installed from the MSI file</p>\r\n<p>- registered the DLL with regsvr32 (just in case)</p>\r\n<p>- and uploaded the DotNetZip-ASPNET-Example to it's own test domain setup through IIS</p>\r\n<p>- and tested it out, and everything seems to be working</p>\r\n<p>But...</p>\r\n<p>When I try to extract an uploaded file on the server it craps out.</p>\r\n<p>Is there any extract samples out there? If anyone had a classic ASP sample that would be even better as the rest of the application is classic ASP.</p>\r\n<p>Thanks.</p>\r\n<p>DB</p>",
    "PostedDate": "2009-10-26T12:02:14.937-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "249894",
    "ThreadId": "73141",
    "Html": "<p>DB -</p>\r\n<p>How do you try extract the uploaded file?</p>\r\n<p>What do you mean &quot;it craps out&quot;?&nbsp; how, exactly?&nbsp; do you get an exception message?&nbsp; what is it?</p>\r\n<p>Have you verified that the uploaded zip is valid? Have you tried opening it in Windows Explorer, or some other tool?&nbsp; (<a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/Zip Tools/GUI.htm\">DotNetZip has a GUI tool</a> that will open zips)&nbsp;</p>\r\n<p>In the doc for DotNetZip, there is <a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/Introduction/COM.htm\">a page that covers COM environments</a>, and gives code examples.&nbsp; You'll be able to use DotNetZip from ASP, just fine, if you follow those examples. There are vbscript and Javascript examples covering creation of zips and extract of zips.&nbsp; You didn't say whether you were using VBScript or Javascript in the ASP pages, so I'm guessing VScript.&nbsp; For example, here's extraction in vbscript:</p>\r\n<pre>dim zip \r\nset zip = Server.CreateObject(&quot;Ionic.Zip.ZipFile&quot;)\r\nzip.Initialize(&quot;CompressedData.zip&quot;)\r\nzip.Password = &quot;This is the Password.&quot;\r\nzip.ExtractAll(&quot;DotNetZip-extract&quot;)\r\nzip.Dispose()\r\n\r\n</pre>",
    "PostedDate": "2009-10-26T12:59:45.66-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "249898",
    "ThreadId": "73141",
    "Html": "<p>Thanks Cheeso</p>\r\n<p>I clearly missed the COM set up you listed in you reply.</p>\r\n<p>As far as how I was trying it, I was referencing this http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=65473 as an example.</p>\r\n<p>I'll try setting it up with COM and try again.</p>\r\n<p>Thanks</p>\r\n<p>DB</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-26T13:11:44.12-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "249927",
    "ThreadId": "73141",
    "Html": "<p>Took a little digging, but I found the file to setup the DLL as a COM object, and got it working with your script sample from above.</p>\r\n<p>A lot faster than the old method we were using.</p>\r\n<p>Thanks again Cheeso</p>",
    "PostedDate": "2009-10-26T14:06:07.157-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "249989",
    "ThreadId": "73141",
    "Html": "<p>Dave, glad it helped.</p>\r\n<p>What was the setup you had missed?&nbsp;&nbsp; The gacutil and regasm stuff?</p>\r\n<p>If you run the Runtime MSI for DotNetZip, those two things -&nbsp;which are required for COM access - happen automatically for you.&nbsp;&nbsp; If you don't run the MSI, like if you just install from the zip file, then you have to do the gacutil and the regasm stuff yourself.&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-26T17:52:20.243-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250139",
    "ThreadId": "73141",
    "Html": "<p>I installed using the MSI, but I am guessing that it couldn't find gacutil and regasm when I ran it.<br>I coudn't locate gacutil on the server until after I installed the .NET SDK.<br>Neither call would work until I added the complete path before their file name.<br><br>I found gacutil here C:\\Program Files\\Microsoft.NET\\SDK\\v2.0 64bit\\Bin<br>and regasm here C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727</p>\r\n<p>Once I added that in everything worked like a charm.</p>",
    "PostedDate": "2009-10-27T05:15:56.22-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250286",
    "ThreadId": "73141",
    "Html": "<p>Need some more help.</p>\r\n<p>I'm trying to verify that the zip file has a file before extracting it, but for what ever reason it doesn't recognize the zip as having entries.</p>\r\n<p>Here's a snippet of my asp code.\r\n<pre>dim zip\r\nresponse.write &quot;Initialize Zip COM...&quot;\r\nset zip = CreateObject(&quot;Ionic.Zip.ZipFile&quot;)\r\nresponse.write &quot;Initialize &quot; &amp; tempPath &amp; &quot; ...&quot;\r\nzip.Initialize(tempPath)\r\n\r\nFor Each entry in zip\r\n    fN = Right(entry.FileName,15)\r\n    if (fN = &quot;imsmanifest.xml&quot;) then\r\n\t\tresponse.write &quot;Extract to &quot; &amp; tempPath2 &amp; &quot; ...&quot;\r\n\t\tzip.ExtractAll(tempPath2)\r\n\t\tEXIT for\r\n    end if\r\nNext\r\n\r\nresponse.write &quot;Dispose Zip COM...&quot;\r\nzip.Dispose()</pre>\r\n</p>\r\n<p>And this is the error I get when I run it.</p>\r\n<p><span style=\"font-family:Arial;font-size:x-small\">Microsoft VBScript runtime </span><span style=\"font-family:Arial;font-size:x-small\">error  '800a01b6'</span></p>\r\n<p><span style=\"font-family:Arial;font-size:x-small\">Object doesn't support this property or method</span></p>\r\n<p><span style=\"font-family:Arial;font-size:x-small\">/asp/admin/content/scorm_uploader/tester.asp</span><span style=\"font-family:Arial;font-size:x-small\">, line 14</span></p>\r\n<p>Line 14 would be the beginning of the For statement. Any idea how to get this working?</p>",
    "PostedDate": "2009-10-27T11:33:31.23-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250328",
    "ThreadId": "73141",
    "Html": "<p>That doesn't make any sense to me.&nbsp;&nbsp; The &quot;for each&quot; line just uses the enumerator on the ZipFile class, and it's definitely there.&nbsp; This code worked for me:</p>\r\n<pre>&lt;%@ LANGUAGE = VBScript %&gt;\r\n&lt;%  Option Explicit             %&gt;\r\n&lt;html&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;ASP DotNetZip&lt;/h1&gt;\r\n\r\n&lt;%\r\n\r\ndim tempPath\r\ntempPath = Server.MapPath(&quot;fodder\\psh2.zip&quot;)\r\n\r\ndim tempPath2\r\ntempPath2 = &quot;c:\\temp\\psh2.zip.ex2&quot;\r\n\r\ndim zip\r\nresponse.write &quot;Initialize Zip COM...&lt;br/&gt;&quot;\r\nset zip = Server.CreateObject(&quot;Ionic.Zip.ZipFile&quot;)\r\nresponse.write &quot;Initialize &quot; &amp; tempPath &amp; &quot; ...&lt;br/&gt;&quot;\r\nzip.Initialize(tempPath)\r\n\r\ndim entry, fN\r\nFor Each entry in zip\r\n    response.write &quot;Looking at entry &quot; &amp; entry.FileName &amp; &quot; ...&lt;br/&gt;&quot;\r\n    fN = Right(entry.FileName, 15)\r\n    if (fN = &quot;imsmanifest.xml&quot;) then\r\n                response.write &quot;Extract to &quot; &amp; tempPath2 &amp; &quot; ...&lt;br/&gt;&quot;\r\n                zip.ExtractAll(tempPath2)\r\n                EXIT for\r\n    end if\r\nNext\r\n\r\nresponse.write &quot;Dispose Zip COM...&lt;br/&gt;&quot;\r\nzip.Dispose()\r\n\r\n%&gt;\r\n\r\n&lt;/body&gt;\r\n&lt;/html&gt;\r\n</pre>\r\n<p>I had to make a couple modifications: I had to dim <strong>entry</strong> and <strong>fN</strong> - otherwise I would get an error about an undeclared variable (or something). Also, I could not, for the life of me, figure out the security on the ASP-&gt;COM -&gt;.NET chain. The problem I was having was <span style=\"font-family:Courier;font-size:10pt\">ASP 0177: Server.CreateObject failed (80070002)</span>. The 80070002 translates to &quot;file not found&quot;, Sometimes that error was replaced with other ones. In the end I copied the Ionic.Zip.dll to %SYSTEMROOT\\system32\\inetsrv directory, and then&nbsp;ran <span style=\"font-family:Courier;font-size:10pt\">regasm /codebase Ionic.Zip.dll</span> from that directory; that allowed me to get past the Server.CreateObject() line. If you have already gotten past that, then you won't need to do this with Ionic.Zip.dll. &nbsp;</p>",
    "PostedDate": "2009-10-27T13:52:12.977-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250695",
    "ThreadId": "73141",
    "Html": "<p>Is there another method I can use to read the zip contents? The 'for each entry' just doesn't want to work here for me at all. Doesn't seem to pick the zip file as having an array of files in it. Everything works fine if I take the for loop and file check out so I know it's not the zip file itself, I even tried with a new zip file created on the server with just the file I'm looking for in it and the for loop still kills the script.</p>",
    "PostedDate": "2009-10-28T07:48:38.04-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250797",
    "ThreadId": "73141",
    "Html": "<p>Enumerating through the zip file is the only way I know of to get a ZipEntry from within a COM environment, like ASP. &nbsp;</p>\r\n<p>What version of DotNetZip are you using?&nbsp; Can you try out the latest v1.9?&nbsp;&nbsp;&nbsp; (that's what I used)</p>\r\n<p>I don't remember now, when I added the COM enumerator capability, but I am pretty sure it was prior to v1.8 .&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-28T11:21:34.12-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250852",
    "ThreadId": "73141",
    "Html": "<p>Should I uninstall 1.8 before going to 1.9?</p>",
    "PostedDate": "2009-10-28T12:52:24.65-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250857",
    "ThreadId": "73141",
    "Html": "<p>yes, you should uninstall the existing v1.8, and then install v1.9. &nbsp; I think the installer may automatically do that for you, but I didn't test it this time around.</p>\r\n<p>I don't know for sure if this will fix the problems you're having, but it's worth a try.</p>",
    "PostedDate": "2009-10-28T13:02:12.957-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "251602",
    "ThreadId": "73141",
    "Html": "<p>Updating to 1.9 didn't do the trick either, still can't parse through any zip files. Initializes and unzips, but won't step through the entries at all.</p>\r\n<p>Could you show me how you'd write the above example in asp.net so I could try that instead?</p>",
    "PostedDate": "2009-10-30T07:47:39.833-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "251717",
    "ThreadId": "73141",
    "Html": "<p>Dave, I don't understand what you mean by &quot;won't step though the entries&quot;.&nbsp; What does it do?&nbsp; Are there actually entries in the zip file?</p>\r\n<p>you might want to check out the <a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/frames.htm\">documentation</a> and <a href=\"http://dotnetzip.codeplex.com/SourceControl/changeset/view/45646#295087\">the examples</a> included in the source.</p>\r\n<p>Does the enumeration work in regular VBScript run from CScript.exe ??&nbsp; (There are examples for that, too, in the documentation.)</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-30T11:56:22.94-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "252481",
    "ThreadId": "73141",
    "Html": "<p>Okay I update to 1.9, and nothing changed really.</p>\r\n<p>Did a server reboot, and nothing changed right away.</p>\r\n<p>Left everything alone over the weekend, and started looking at it again this morning.</p>\r\n<p>Moved all my variable initializing outside the IF statement, and for some odd reason everything now works.</p>\r\n<p>Not sure if it was the variables or what, but it works like a charm now.</p>\r\n<p>Thanks for your help Cheeso.</p>\r\n<p>Here's my code sample if anyone else needs it for reference later.</p>\r\n<p>DB</p>\r\n<p>&nbsp;</p>\r\n<pre>&lt;%@ LANGUAGE = VBScript %&gt;\r\n&lt;% Option Explicit %&gt;\r\n&lt;%\r\nDim tempPath, tempPath2, fileToDownload\r\nDim zip, entry, fN\r\n\r\ntempPath = Request.ServerVariables(&quot;APPL_PHYSICAL_PATH&quot;) &amp; &quot;uploads\\&quot;\r\ntempPath2 = Request.ServerVariables(&quot;APPL_PHYSICAL_PATH&quot;) &amp; &quot;unZips\\&quot;\r\nfileToLook4 = &quot;imsmanifest.xml&quot; 'SCORM manifest file to look for\r\n\r\n   if tempPath &lt;&gt; &quot;&quot; Then\r\n   \t\tresponse.write(&quot;Instantiating another ZipFile object ...&quot;)\r\n\t\tset zip = Server.CreateObject(&quot;Ionic.Zip.ZipFile&quot;)\r\n\t\tzip.Initialize(tempPath)\r\n    \t        response.write(&quot;Initialize (Read) ...&quot;)\r\n\t\tFor Each entry in zip\r\n       \t\t        response.write(&quot;  &quot; &amp; entry.FileName &amp; &quot; ...&quot;)\r\n\t\t\tfN = Right(entry.FileName,15)\r\n\t\t        if fN = fileToLook4 then\r\n\t\t\t\tresponse.write(&quot;Found match, exporting files ...&quot;)\r\n\t\t\t\tzip.ExtractAll(tempPath2)\r\n\t\t\t\tEXIT for\r\n\t\t\tend if\r\n\t\tNext\r\n                response.write(&quot;Export complete, close out ...&quot;)\r\n\t\tzip.Dispose()\r\n\tend if\r\n\r\nset fN = nothing\r\nset entry = nothing\r\nset zip = nothing\r\nset tempPath = nothing\r\nset tempPath2 = nothing\r\nset fileToDownload = nothing\r\n%&gt;</pre>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-11-02T09:47:55.28-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "252636",
    "ThreadId": "73141",
    "Html": "<p>great! Glad it's working.</p>",
    "PostedDate": "2009-11-02T19:25:55.103-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "252864",
    "ThreadId": "73141",
    "Html": "<p>Hey Cheeso</p>\r\n<p>Any idea why it would hold on to control of the zip file after it was disposed?</p>\r\n<p>I'm trying to delete the zip after it's been unpackaged, but it seems to be maintaining control of the zip file until I go in and restart the application pool in IIS, at which point I can manually delete the files.</p>\r\n<p>Any idea what would cause this?</p>\r\n<p>Thanks again</p>\r\n<p>DB</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-11-03T08:03:54.79-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "253010",
    "ThreadId": "73141",
    "Html": "<p>Wassup Dave,</p>\r\n<p>No, I don't have any good ideas on why the zipfile would remain locked.&nbsp; The Dispose() call should close the file, and unlock it, as you would expect.&nbsp; I can do some tests here to see if I can figure out why you're getting those results.&nbsp;</p>\r\n<p>But I won't be able to get to it today.&nbsp; Soon though.</p>\r\n<p>My plan is to use sysinternals' procmon to track the open/close on the zipfile.&nbsp; If you feel like doing some additional investigation, that aveneue might be interesting.</p>\r\n<p>I'll let ya know</p>",
    "PostedDate": "2009-11-03T14:23:28.037-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]