[
  {
    "Id": "218867",
    "ThreadId": "64325",
    "Html": "<p>Hi,</p>\r\n<p>My Application is running on a server. This is the place where the file to be archived is available.</p>\r\n<p>When a download button is clicked, the file is being saved with &quot;.zip&quot; extension. However, when I try to extract the file using WinZip,I am getting an error as: <strong>Cannot Download the File. </strong></p>\r\n<p><span style=\"color:#0000ff\">It's working fine when I run it in the development system (local). </span></p>\r\n<p>Here's the code:</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>                    Response.Clear();\r\n                    Response.BufferOutput = <span style=\"color:Blue\">false</span>;\r\n                    <span style=\"color:Blue\">string</span> archiveName = <span style=\"color:#A31515\">&quot;Archive_US.zip&quot;</span>;\r\n\r\n                    Response.ContentType = <span style=\"color:#A31515\">&quot;application/zip&quot;</span>;\r\n                    Response.AddHeader(<span style=\"color:#A31515\">&quot;content-disposition&quot;</span>, <span style=\"color:#A31515\">&quot;attachment; filename=&quot;</span> + archiveName);\r\n                    <span style=\"color:Blue\">string</span> Password = <span style=\"color:Blue\">string</span>.Format(<span style=\"color:#A31515\">&quot;reports_{0}&quot;</span>, DateTime.Now.ToString(<span style=\"color:#A31515\">&quot;HHmmss&quot;</span>));\r\n                    <span style=\"color:Blue\">using</span> (ZipFile zip = <span style=\"color:Blue\">new</span> ZipFile())\r\n                    {\r\n                        zip.Password = Password;\r\n                        zip.AddFile(ConfigurationManager.AppSettings[<span style=\"color:#A31515\">&quot;USPath&quot;</span>].ToString(), <span style=\"color:#A31515\">&quot;Reports&quot;</span>);\r\n                        zip.Save(ConfigurationManager.AppSettings[<span style=\"color:#A31515\">&quot;USPath&quot;</span>].ToString());\r\n                        <span style=\"color:Blue\">string</span> fileName = <span style=\"color:Blue\">string</span>.Format(<span style=\"color:#A31515\">Response.OutputStream</span>);\r\n                    }\r\n                    HttpContext.Current.ApplicationInstance.CompleteRequest();\r\n<br></pre>\r\n</div>\r\n</p>\r\n<p>I tried extracting using WinRar, here, it extracts the file as an Unknown type. I have to right click on the extracted archive file and open with Winrar , which goes to the archived file and then asks for the password.</p>\r\n<p>&nbsp;</p>\r\n<p>Can anyone please check on this? This only happens , when the file is being downloaded from a location other than the local system.</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks</p>\r\n<p>Abhijith</p>\r\n<p><img alt=\"\"></p>",
    "PostedDate": "2009-08-03T10:11:40.21-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218883",
    "ThreadId": "64325",
    "Html": "<p>I'm sorry, I don't understand the problem, at all.&nbsp;&nbsp; Your description is not clear to me.</p>\r\n<p>I think the problem is, you cannot open a zip file in WinZip.&nbsp;I think the zip file is being generated from an ASPNET page.&nbsp;&nbsp; &nbsp;But then, &nbsp;I don't understand why you get an error like &quot;Cannot download the file&quot;.&nbsp; Is the file present or not, on the local system?&nbsp; Are you trying to open a file that is on a local disk?&nbsp; Or...?&nbsp;</p>\r\n<p>If the file is not present on the local system, then can you save it? &nbsp; Normally you get a &quot;Save As...&quot; dialog when you click on a download link in a web browser.&nbsp; What happens if you select &quot;Save&quot;&nbsp; and specify a location for the file?&nbsp;&nbsp; Do you get &quot;Cannot download&quot;?&nbsp;&nbsp;&nbsp; If you don't, in other words if it downloads correctly, then can you open the file on that location?</p>\r\n<p>Also your description seems to have trailed off, truncated or something.&nbsp; &quot;I have to right click on the extracted archive file and open with WinRar, which goes to the arc&quot;.&nbsp; I&nbsp;have no idea what you are talking about here.&nbsp; What extracted archive file?&nbsp; What is being extracted?&nbsp; I thought you were having trouble <em>opening </em>a file. &nbsp;&nbsp;&nbsp; Now you are talking about an extracted file.&nbsp; ???&nbsp; And what does it mean &quot;goes to the arc&quot;. ??</p>\r\n<p>please clarify.&nbsp; I don't know what your app is doing, what zip tools you have, or what you are seeing.&nbsp; you'll have to describe all that, if it's relevant. &nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-03T11:06:17.793-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218898",
    "ThreadId": "64325",
    "Html": "<p>Sorry Cheeso, I think some of the text got truncated.</p>\r\n<p>Anyway Here's the problem:</p>\r\n<p>I have a download link on a web app that is being hosted on a server. Now, I run the app through the browser in my local system .</p>\r\n<p>There is a download button on the page. When this button is clicked, it generates a Save Dialog box, with option to &quot;SAVE AS&quot;.</p>\r\n<p>When I give the download path as my local system hard disk, it gets saved at that location as &quot;Archive.zip&quot;. This file is being downloaded from the</p>\r\n<p>server.</p>\r\n<p>Now, There are two option by which I can extract this zip file. One by using, WIN ZIP and the other using WIN RAR.</p>\r\n<p>1. When I try to extract using WinZip, I get the error as : &quot;Cannot download the file&quot;.</p>\r\n<p>2. When I try to extract using WinRar, the file gets extracted (doesn't ask for password here). The extracted file type is Unknown.</p>\r\n<p>&nbsp;&nbsp; I have to right click and select open with and select the file type as Win Rar to open the file. Here It shows me the File in the Win Rar</p>\r\n<p>&nbsp; window and when I click on the file to open it, it asks for the password.</p>\r\n<p>&nbsp;</p>\r\n<p>I hope my explanation is clear enough now, If not, please let me know.</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks <br>Abhijith</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-03T11:34:18.94-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218902",
    "ThreadId": "64325",
    "Html": "<p>You have an option to &quot;Save As..&quot;&nbsp; and you save the file successfully.&nbsp; Is that correct?</p>\r\n<p>And then you have a saved file on your local filesystem, is that correct?&nbsp;&nbsp; What browser are you using?&nbsp; How long does the download take?&nbsp; and how do you confirm that the download is complete?</p>\r\n<p>then, after the download is complete, when you try opening the local file, you get a message from WinZip saying &quot;Cannot download file.&quot;&nbsp; Is that correct?</p>\r\n<p>If so, I don't understand what is happening.&nbsp;</p>\r\n<p>I don't understand how you can get a message about downloading if there is no download involved?&nbsp; &nbsp;The download is complete., if I am understanding you correctly.&nbsp;&nbsp; You are merely opening a file, that had previously been downloaded.&nbsp;</p>\r\n<p>There is something I am still not understanding about all of this.</p>\r\n<p>First, how do you try to extract with WinZip?&nbsp; do you click on the WinZip icon, then Click the Open icon within WinZip, and then specify the path of the newly-downloaded zip file that you want to open?&nbsp; if not, then how?&nbsp;</p>\r\n<p>Also, can you check - After the download is complete, can you verify the size and timestamp and name of the downloaded file?&nbsp; Can you give me an explorer screenshot that shows the downloaded file and all of these properties?&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-03T11:47:49.687-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218914",
    "ThreadId": "64325",
    "Html": "<p>You have an option to &quot;Save As..&quot;&nbsp; and you save the file successfully.&nbsp; Is that correct?</p>\r\n<p><span style=\"color:#ff0000\">Yes. The file is saved successfully</span></p>\r\n<p>And then you have a saved file on your local filesystem, is that correct?&nbsp;&nbsp; What browser are you using?&nbsp; How long does the download take?&nbsp; and how do you confirm that the download is complete?</p>\r\n<p><span style=\"color:#ff0000\">I am using IE 7.0 . The download hardly takes few seconds. And the Archive.zip is visble on the location where I save it.</span></p>\r\n<p>then, after the download is complete, when you try opening the local file, you get a message from WinZip saying &quot;Cannot download file.&quot;&nbsp; Is that correct?</p>\r\n<p><span style=\"color:#ff0000\">Yes. When I try to extract using WinZip, I get the message.</span></p>\r\n<p>If so, I don't understand what is happening.&nbsp;</p>\r\n<p>I don't understand how you can get a message about downloading if there is no download involved?&nbsp; &nbsp;The download is complete., if I am understanding you correctly.&nbsp;&nbsp; You are merely opening a file, that had previously been downloaded.&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>There is something I am still not understanding about all of this.</p>\r\n<p>First, how do you try to extract with WinZip?&nbsp; do you click on the WinZip icon, then Click the Open icon within WinZip, and then specify the path of the newly-downloaded zip file that you want to open?&nbsp; if not, then how?&nbsp;</p>\r\n<p><span style=\"color:#ff0000\">Yes, I do click on the open icon within winzip and then specify the path of the newly-downloaded file.</span></p>\r\n<p>Also, can you check - After the download is complete, can you verify the size and timestamp and name of the downloaded file?&nbsp; Can you give me an explorer screenshot that shows the downloaded file and all of these properties?</p>\r\n<p>&nbsp;</p>\r\n<p><span style=\"color:#ff0000\">How Do I paste the screenshots ?? I am not able to paste them here.</span></p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-03T12:04:09.93-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218923",
    "ThreadId": "64325",
    "Html": "<p>To past images, you can upload images to a free image host server, like tinypic.com,&nbsp;and then click the &lt;HTML&gt; icon in the editor window, and insert the appropriate &lt;img&gt; tag.</p>",
    "PostedDate": "2009-08-03T12:29:20.003-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218924",
    "ThreadId": "64325",
    "Html": "<p>Also, what is the EXACT error message from WinZip?&nbsp;&nbsp; And are you sure it is really coming from WinZip?&nbsp; can you get a screenshot of that, too?</p>\r\n<p><strong>EDIT</strong>: I searched for &quot;cannot download the file&quot; and &quot;Winzip&quot; and found no matches.&nbsp; Are you sure that is the message?&nbsp;</p>",
    "PostedDate": "2009-08-03T12:31:21.98-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218933",
    "ThreadId": "64325",
    "Html": "<p>Hi Cheeso,</p>\r\n<p>This is the Downloaded file:</p>\r\n<p><a href=\"http://tinypic.com\"><img src=\"http://i28.tinypic.com/a0hsv6.png\" border=0 alt=\"Image and video hosting by TinyPic\"></a></p>\r\n<p>&nbsp;</p>\r\n<p>Properties :</p>\r\n<p><a href=\"http://tinypic.com\"><img src=\"http://i30.tinypic.com/2610ri9.png\" border=0 alt=\"Image and video hosting by TinyPic\"></a></p>\r\n<p>&nbsp;</p>\r\n<p>When I extract the Archive_US.zip using <strong>WinZip</strong>, I get the following message:</p>\r\n<p><a href=\"http://tinypic.com\"><img src=\"http://i25.tinypic.com/eah7uw.png\" border=0 alt=\"Image and video hosting by TinyPic\"></a></p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>When I extract the Archive_US.zip using <strong>WinRar</strong>, I get the following file:</p>\r\n<p><a href=\"http://tinypic.com\"><img src=\"http://i31.tinypic.com/313rvrr.png\" border=0 alt=\"Image and video hosting by TinyPic\"></a></p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>Now, I have to do a : &ldquo;<strong>Open With&rdquo; </strong>and select WinRar Archiver to open the folder inside this archive.</p>\r\n<p><a href=\"http://tinypic.com\"><img src=\"http://i28.tinypic.com/24weyc9.png\" border=0 alt=\"Image and video hosting by TinyPic\"></a></p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>Once I select the WinRAR archiver, I get the following window:</p>\r\n<p>&nbsp;</p>\r\n<p><a href=\"http://tinypic.com\"><img src=\"http://i29.tinypic.com/2igziid.png\" border=0 alt=\"Image and video hosting by TinyPic\"></a></p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>The USReports.csv file is password protected.</p>",
    "PostedDate": "2009-08-03T12:59:23.35-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218938",
    "ThreadId": "64325",
    "Html": "<p>ok, getting better. . .</p>\r\n<p>It's clear now that you are not getting a message saying &quot;Cannot download the file&quot;.&nbsp; The message I see is &quot;Cannot open file: it does not appear to be a valid archive.&quot;&nbsp; and &quot;if you downloaded this file, try downloading the file again.&quot;&nbsp;</p>\r\n<p>Just a note: &nbsp;I can help you best if you are accurate in ALL of your descriptions.&nbsp; If you give me a description that is inaccurate, then I cannot help you.&nbsp; In addition, it's a giant waste of everyone's time.</p>\r\n<p>Ok, now if WinZip cannot open the file, I suspect the zip file is corrupted.&nbsp;&nbsp;</p>\r\n<p>You then said that when you extract the same archive with WinRAR, you get a file called &quot;Archive_US&quot;.&nbsp; it appears to have no extension.&nbsp; is that right?&nbsp; What I understand is that you opened the Archive_US.zip file with WinRar, and extracted its contents, and got a new file, named &quot;Archive_US&quot;.&nbsp; Is that right?&nbsp; If that is not right, then where did the file named &quot;Archive_US&quot; come from?</p>\r\n<p>Then you open *that* file with WinRar.&nbsp; but because it has no extension, you have to do the right-click and open-with trick.&nbsp; And then WinRar succeeds in opening the file.</p>\r\n<p>It sounds to me, from your description, that you have a zip file within a zip file?&nbsp; And the zip file within the zip file does not have the .zip extension.&nbsp; Is that right?&nbsp;</p>\r\n<p>Why do you use a zipfile within a zipfile?</p>\r\n<p>I'm sure there is still something I don't understand about this very confusing situation.</p>\r\n<p>Is it true that the first (outer) zipfile itself is 4364 bytes, and then there is a single zipfile contained within it, and then contained within that zip file is a single file of 1120 bytes?&nbsp; Something is wrong with your zip file.&nbsp;</p>\r\n<p>in your code, what does the highlighted line do?:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>     <span style=\"color:Blue\">using</span> (ZipFile zip = <span style=\"color:Blue\">new</span> ZipFile())\r\n        {\r\n            zip.Password = Password;\r\n            zip.AddFile(ConfigurationManager.AppSettings[<span style=\"color:#A31515\">&quot;USPath&quot;</span>].ToString(), <span style=\"color:#A31515\">&quot;Reports&quot;</span>);\r\n            zip.Save(ConfigurationManager.AppSettings[<span style=\"color:#A31515\">&quot;USPath&quot;</span>].ToString());\r\n            <span style=\"color:Red\"><strong>string</strong> fileName = <strong>string</strong>.Format(Response.OutputStream);</span>\r\n        }\r\n     HttpContext.Current.ApplicationInstance.CompleteRequest();\r\n\r\n</pre>\r\n</div>\r\n<p>Also, look at the line you have for Save().&nbsp; Your code appears to be saving the ZipFile to a path that is specified in the web.config file.&nbsp; Is that correct?&nbsp; Is that what you really want?&nbsp; Remember that this code runs in an ASPNET page, which runs on a server.&nbsp; The path specified in the web.config file is relative to the server.&nbsp; if you specify c:\\document\\path.zip in the web config file, it will save to that location <em>on the server</em>.&nbsp;&nbsp; This seems like the wrong thing to do, if you are trying to create a zipfile that gets downloaded to the browser.&nbsp;</p>\r\n<p>I think that odd Save() line may be the reason you have a zip file within a zip file.&nbsp; &nbsp;This is not a normal thing to do.&nbsp; It looks very broken to me. &nbsp;Not only are you saving to a server-based path, but also you are saving to the exact location of the file that you are trying to add to the zip.&nbsp; ???&nbsp;&nbsp; That makes no sense to me.&nbsp; Normally people would do something like this:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>     <span style=\"color:Blue\">using</span> (ZipFile zip = <span style=\"color:Blue\">new</span> ZipFile())\r\n        {\r\n            zip.Password = Password;\r\n            zip.AddFile(ConfigurationManager.AppSettings[<span style=\"color:#A31515\">&quot;USPath&quot;</span>].ToString(), <span style=\"color:#A31515\">&quot;Reports&quot;</span>);\r\n            zip.Save(Response.OutputStream);\r\n        }\r\n     HttpContext.Current.ApplicationInstance.CompleteRequest();\r\n\r\n</pre>\r\n</div>\r\n<p>In this case, ConfigurationManager.AppSettings[<span style=\"color:#A31515\">&quot;USPath&quot;</span>].ToString() is the file being added to the zip, and the zipfile gets downloaded to the requesting browser.</p>",
    "PostedDate": "2009-08-03T13:22:30.86-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218942",
    "ThreadId": "64325",
    "Html": "<p>Hi Cheeso,</p>\r\n<p>Thanks for the reply. I am sorry if my questions are confusing, I am trying my best to be as transparent as possible.</p>\r\n<p>Anyways, below are some of the clarifications:</p>\r\n<p>&nbsp;</p>\r\n<p>Here is the full code :</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>                    Response.Clear();<br>                    Response.BufferOutput = <span style=\"color:Blue\">false</span>;<br>                    <span style=\"color:Blue\">string</span> archiveName = <span style=\"color:#A31515\">&quot;Archive_US.rar&quot;</span>;<br><br>                    Response.ContentType = <span style=\"color:#A31515\">&quot;application/rar&quot;</span>;<br>                    Response.AddHeader(<span style=\"color:#A31515\">&quot;content-disposition&quot;</span>, <span style=\"color:#A31515\">&quot;attachment; filename=&quot;</span> + archiveName);<br>                    <span style=\"color:Blue\">string</span> Password = <span style=\"color:Blue\">string</span>.Format(<span style=\"color:#A31515\">&quot;reports_{0}&quot;</span>, DateTime.Now.ToString(<span style=\"color:#A31515\">&quot;HHmmss&quot;</span>));<br>                    <span style=\"color:Blue\">using</span> (ZipFile zip = <span style=\"color:Blue\">new</span> ZipFile())<br>                    {<br>                        zip.Password = Password;<br>                        zip.AddFile(ConfigurationManager.AppSettings[<span style=\"color:#A31515\">&quot;USPath&quot;</span>].ToString(), <span style=\"color:#A31515\">&quot;Reports&quot;</span>);<br>                        zip.Save(Response.OutputStream);<br>                    }<br>                    HttpContext.Current.ApplicationInstance.CompleteRequest();<br></pre>\r\n</div>\r\n<p>&nbsp;</p>\r\n<p>You then said that when you extract the same archive with WinRAR, you get a file called &quot;Archive_US&quot;.&nbsp; it appears to have no extension.&nbsp; is that right?&nbsp; What I understand is that you opened the Archive_US.zip file with WinRar, and extracted its contents, and got a new file, named &quot;Archive_US&quot;.&nbsp; Is that right?&nbsp; If that is not right, then where did the file named &quot;Archive_US&quot; come from?</p>\r\n<p><span style=\"color:#ff0000\">Yes. The extracted file does not have any extension. and I open the zip file with WinRAR and got the Archive_US </span>file.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>Then you open *that* file with WinRar.&nbsp; but because it has no extension, you have to do the right-click and open-with trick.&nbsp; And then WinRar succeeds in opening the file.</p>\r\n<p>It sounds to me, from your description, that you have a zip file within a zip file?&nbsp; And the zip file within the zip file does not have the .zip extension.&nbsp; Is that right?&nbsp;</p>\r\n<p><span style=\"color:#ff0000\">Yes. That is exactly what is happening. </span></p>\r\n<p>Why do you use a zipfile within a zipfile?</p>\r\n<p><span style=\"color:#ff0000\">I am not sure why the ZipFile inside a zip file is being created!! You can refer to the code above.<br></span></p>\r\n<p>I'm sure there is still something I don't understand about this very confusing situation.</p>\r\n<p>Is it true that the first (outer) zipfile itself is 4364 bytes, and then there is a single zipfile contained within it, and then contained within that zip file is a single file of 1120 bytes?&nbsp; Something is wrong with your zip file.&nbsp;</p>\r\n<p><span style=\"color:#ff0000\">Yes. The size is right</span></p>\r\n<p>in your code, what does the highlighted line do?:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>     <span style=\"color:Blue\">using</span> (ZipFile zip = <span style=\"color:Blue\">new</span> ZipFile())<br>        {<br>            zip.Password = Password;<br>            zip.AddFile(ConfigurationManager.AppSettings[<span style=\"color:#a31515\">&quot;USPath&quot;</span>].ToString(), <span style=\"color:#a31515\">&quot;Reports&quot;</span>);<br>            zip.Save(ConfigurationManager.AppSettings[<span style=\"color:#a31515\">&quot;USPath&quot;</span>].ToString());<br>            <span style=\"color:Red\"><strong>string</strong> fileName = <strong>string</strong>.Format(Response.OutputStream);</span><br>        }<br>     HttpContext.Current.ApplicationInstance.CompleteRequest();<br><br></pre>\r\n</div>\r\n<p>Also, look at the line you have for Save().&nbsp; Your code appears to be saving the ZipFile to a path that is specified in the web.config file.&nbsp; Is that correct?&nbsp; Is that what you really want?&nbsp; Remember that this code runs in an ASPNET page, which runs on a server.&nbsp; The path specified in the web.config file is relative to the server.&nbsp; if you specify c:\\document\\path.zip in the web config file, it will save to that location <em>on the server</em>.&nbsp;&nbsp; This seems like the wrong thing to do, if you are trying to create a zipfile that gets downloaded to the browser.&nbsp;</p>\r\n<p>I think that odd Save() line may be the reason you have a zip file within a zip file.&nbsp; &nbsp;This is not a normal thing to do.&nbsp; It looks very broken to me. &nbsp;Not only are you saving to a server-based path, but also you are saving to the exact location of the file that you are trying to add to the zip.&nbsp; ???&nbsp;&nbsp; That makes no sense to me.&nbsp; Normally people would do something like this:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>     <span style=\"color:Blue\">using</span> (ZipFile zip = <span style=\"color:Blue\">new</span> ZipFile())<br>        {<br>            zip.Password = Password;<br>            zip.AddFile(ConfigurationManager.AppSettings[<span style=\"color:#a31515\">&quot;USPath&quot;</span>].ToString(), <span style=\"color:#a31515\">&quot;Reports&quot;</span>);<br>            zip.Save(Response.OutputStream);<br>        }<br>     HttpContext.Current.ApplicationInstance.CompleteRequest();<br></pre>\r\n</div>\r\n<p>In this case, ConfigurationManager.AppSettings[<span style=\"color:#a31515\">&quot;USPath&quot;</span>].ToString() is the file being added to the zip, and the zipfile gets downloaded to the requesting browser.</p>\r\n<p><span style=\"color:#ff0000\">If you refer to my complete code , it is doing the same thing that you've mentioned . But still the issue persists.</span></p>\r\n<p>&nbsp;</p>\r\n<p>Thanks,</p>\r\n<p>Abhijith</p>",
    "PostedDate": "2009-08-03T13:42:54.057-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218953",
    "ThreadId": "64325",
    "Html": "<p>Abhijith, yes, the issue persists.&nbsp; That is not a surprise.&nbsp; Here's why.</p>\r\n<p>Your&nbsp;original code - posted on the first message of this thread - caused a corruption.&nbsp; Did you ever run that code?&nbsp;&nbsp; Even once?&nbsp;&nbsp; I think you did.&nbsp; If so, it explains why you have a zip file within a zip file.&nbsp; As soon as you ran that code, the file that is referred to by <strong>ConfigurationManager.AppSettings[<span style=\"color:#a31515\">&quot;USPath&quot;</span>].ToString() </strong><em>was overwritten</em>.&nbsp;&nbsp;It was over-written with a ZIP file.&nbsp;</p>\r\n<p>Then, suppose you fixed your code.&nbsp; With the fix, I suppose it does not save to ConfigurationManager.AppSettings[<span style=\"color:#a31515\">&quot;USPath&quot;</span>].ToString(), instead it saves to Response.OutputStream.&nbsp; But the file you are now adding to the zip file is obtained from ConfigurationManager.AppSettings[<span style=\"color:#a31515\">&quot;USPath&quot;</span>].ToString(), which we know contains a ZIP.&nbsp; We know it was overwritten before, with the broken code.&nbsp; It may not have the name of a zip, but because you ran the broken code once, the original content of that file on the server is gone.&nbsp; The content is replaced with a zip file, though it may not have the .zip extension.</p>\r\n<p>It seems to me your code and your tests are a little out of control.&nbsp; You need to do a reset, start over. Clear out the old files, clear out the old code.&nbsp;&nbsp;Verify that your zip.Save() is saving to the proper place.&nbsp; Verify that the file you are adding is what you think it is.&nbsp;&nbsp;&nbsp;take it step by step.</p>\r\n<p>The original problem seems to have come from bad code on your part - saving a zip over a file you were loading.&nbsp; Since then, who knows what things we're trying to chase down?&nbsp; Start over.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-03T14:15:59.287-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "218960",
    "ThreadId": "64325",
    "Html": "<p>Hi Cheeso,</p>\r\n<p>Thanks for the help. Will sure do try to rework and get back if it's working.</p>",
    "PostedDate": "2009-08-03T14:32:23.713-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "220553",
    "ThreadId": "64325",
    "Html": "<p>Hi Cheeso,</p>\r\n<p>Sorry for not replying back soon enough. You were right.&nbsp; I re-wrote the code ,tested it over again. It works now.</p>\r\n<p>Thanks a lot for the help and extremely sorry for wasting your precious time.</p>\r\n<p>&nbsp;</p>\r\n<p>Cheers</p>\r\n<p>Abhijith</p>",
    "PostedDate": "2009-08-06T15:43:49.193-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "220586",
    "ThreadId": "64325",
    "Html": "<p>Super, glad it's working for you.</p>\r\n<p>Software can be tricky sometimes.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-08-06T17:36:56.127-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]