[
  {
    "Id": "414607",
    "ThreadId": "203952",
    "Html": "<p>I've searched for this error, but couldn't find anything relevant.</p>\r\n<p>&nbsp;</p>\r\n<p>I'm building a page with some files that when their checkboxes are selected, they'll get zipped in a file.</p>\r\n<p>Apparently it's working, but only for the 1st time. I mean, if I load the page again, after the 1st time I try to zip some files, I get the following error:</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<pre>The entry name must be non-null and non-empty. <br>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br><br>Exception Details: Ionic.Zip.ZipException: The entry name must be non-null and non-empty.<br><br><strong>Source Error:</strong> <br></pre>\r\n<table border=0 width=\"100%\" bgcolor=\"#ffffcc\">\r\n<tbody>\r\n<tr>\r\n<td>\r\n<pre>Line 36:        <br>Line 37:         Using zip As New ZipFile()<br><span style=\"color:red\">Line 38:             zip.AddFiles(vectorfic, &quot;&quot;)<br></span>Line 39:                               <br>Line 40:             zip.Save(Response.OutputStream)</pre>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<pre><br>\r\n\r\nStack Trace: \r\n\r\n\r\n[ZipException: The entry name must be non-null and non-empty.]\r\n   Ionic.Zip.ZipEntry.Create(String filename, String nameInArchive, Boolean isStream, Stream stream) in C:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipEntry.cs:2520\r\n   Ionic.Zip.ZipEntry.Create(String filename, String nameInArchive) in C:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipEntry.cs:2513\r\n   Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive) in C:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipFile.cs:2577\r\n   Ionic.Zip.ZipFile.AddFiles(IEnumerable`1 fileNames, Boolean preserveDirHierarchy, String directoryPathInArchive) in C:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipFile.cs:2843\r\n   Ionic.Zip.ZipFile.AddFiles(IEnumerable`1 fileNames, String directoryPathInArchive) in C:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipFile.cs:2772\r\n   ASP._2_aspx.Page_Load(Object sender, EventArgs e) in C:\\Inetpub\\wwwroot\\2.aspx:38\r\n   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14\r\n   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35\r\n   System.Web.UI.Control.OnLoad(EventArgs e) +99\r\n   System.Web.UI.Control.LoadRecursive() +50\r\n   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627\r\n\r\n \r\n</pre>\r\n<p>&nbsp;</p>\r\n<p>This is my code:</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">script</span> <span style=\"color:Red\">language</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;VB&quot;</span> <span style=\"color:Red\">runat</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;server&quot;</span><span style=\"color:Blue\">&gt;</span>\r\n\r\n\r\n\tSub Page_Load(sender As Object, e As EventArgs)\r\n\t    Dim vectorfic as New System.Collections.Generic.List(Of String)()\r\n        chkbox.Text = &quot;&quot;\r\n\t\tIf Not(Request.Form(&quot;multiple&quot;) Is Nothing) Then\t\t\r\n            chkbox.Text = Request.Form(&quot;multiple&quot;)\r\n            'Response.Write(chkbox.Text &amp; &quot;<span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">br</span><span style=\"color:Blue\">&gt;</span>&quot;)\t\t\t\t\t\t\r\n        End If\r\n        vectorfic.AddRange(Split(chkbox.Text, &quot;,&quot;)\r\n<br>        Dim archiveName As String = String.Format(&quot;archive-{0}.zip&quot;, DateTime.Now.ToString(&quot;yyyy-MMM-dd-HHmmss&quot;))\r\n        Response.ContentType = &quot;application/zip&quot;\r\n        Response.AddHeader(&quot;content-disposition&quot;, &quot;filename=&quot; + archiveName)\r\n       \r\n        Using zip As New ZipFile()\r\n            zip.AddFiles(vectorfic, &quot;&quot;)                 \r\n            zip.Save(Response.OutputStream)\r\n        End Using\r\n        \r\n    End Sub\r\n\r\n<span style=\"color:Blue\">&lt;/</span><span style=\"color:#A31515\">script</span><span style=\"color:Blue\">&gt;</span>\r\n\r\n<span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">html</span><span style=\"color:Blue\">&gt;</span>\r\n<span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">head</span><span style=\"color:Blue\">&gt;</span>\r\n<span style=\"color:Blue\">&nbsp;</span><span style=\"color:Blue\">&lt;/</span><span style=\"color:#A31515\">head</span><span style=\"color:Blue\">&gt;</span>\r\n<span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">body</span><span style=\"color:Blue\">&gt;</span>\r\n<span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">form</span> <span style=\"color:Red\">runat</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;server&quot;</span><span style=\"color:Blue\">&gt;</span>\r\n\r\n  <span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">h2</span><span style=\"color:Blue\">&gt;</span>Some sample checkbox form elements:<span style=\"color:Blue\">&lt;/</span><span style=\"color:#A31515\">h2</span><span style=\"color:Blue\">&gt;</span>\r\n\r\n\r\n  Multiple HTML Checkboxs With The Same Name:\r\n    <span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">input</span> <span style=\"color:Red\">id</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;Checkbox1&quot;</span> <span style=\"color:Red\">name</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;multiple&quot;</span> <span style=\"color:Red\">value</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;C:\\Inetpub\\wwwroot\\fic1.txt&quot;</span> <span style=\"color:Red\">type</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;checkbox&quot;</span> <span style=\"color:Blue\">/&gt;</span>\r\n    <span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">input</span> <span style=\"color:Red\">id</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;Checkbox2&quot;</span> <span style=\"color:Red\">name</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;multiple&quot;</span> <span style=\"color:Red\">value</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;C:\\Inetpub\\wwwroot\\fic2.txt&quot;</span> <span style=\"color:Red\">type</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;checkbox&quot;</span> <span style=\"color:Blue\">/&gt;</span>\r\n    <span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">input</span> <span style=\"color:Red\">id</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;Checkbox3&quot;</span> <span style=\"color:Red\">name</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;multiple&quot;</span> <span style=\"color:Red\">value</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;C:\\Inetpub\\wwwroot\\fic3.txt&quot;</span> <span style=\"color:Red\">type</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;checkbox&quot;</span> <span style=\"color:Blue\">/&gt;</span>\r\n\r\n  <span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">br</span> <span style=\"color:Blue\">/&gt;</span>\r\n  <span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">br</span> <span style=\"color:Blue\">/&gt;</span>\r\n\r\n    <span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">input</span> <span style=\"color:Red\">type</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;submit&quot;</span> <span style=\"color:Blue\">/&gt;</span>\r\n<span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">strong</span><span style=\"color:Blue\">&gt;</span><span style=\"color:Blue\">&lt;</span><span style=\"color:#A31515\">asp</span><span style=\"color:Blue\">:</span><span style=\"color:#A31515\">label</span> <span style=\"color:Red\">id</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;chkbox&quot;</span> <span style=\"color:Red\">runat</span><span style=\"color:Blue\">=</span><span style=\"color:Blue\">&quot;server&quot;</span> <span style=\"color:Blue\">/&gt;</span><span style=\"color:Blue\">&lt;/</span><span style=\"color:#A31515\">strong</span><span style=\"color:Blue\">&gt;</span>\r\n</pre>\r\n</div>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>Is this because of something not closed, what do you think is missing ?</p>\r\n<p>Thanks in advance</p>\r\n<div id=\"_mcePaste\" style=\"overflow:hidden;left:-10000px;top:0px;width:1px;height:1px\"><strong>Source Error:</strong> <br><br> \r\n<table border=0 width=\"100%\" bgcolor=\"#ffffcc\">\r\n<tbody>\r\n<tr>\r\n<td>\r\n<pre>Line 36:        <br>Line 37:         Using zip As New ZipFile()<br><span style=\"color:red\">Line 38:             zip.AddFiles(vectorfic, &quot;&quot;)<br></span>Line 39:                               <br>Line 40:             zip.Save(Response.OutputStream)</pre>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</div>",
    "PostedDate": "2010-03-05T07:14:09.557-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "414843",
    "ThreadId": "203952",
    "Html": "<p>The &quot;non-null and non empty&quot; error means that you're trying to add a file that has either a null value or &quot;&quot; as the filename.</p>\r\n<p>Check the value of vectorfic before the call to AddFiles().&nbsp; I expect that you will find that one of the values in the list is either empty or null.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-03-05T17:26:43.663-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]