I have an issue where the zip file I generate is different depending on whether I save it to a file or save it to a stream.
I'm basically building a zip file that will be a Windows gadget. (gadget files are just zips) The gadget file is built on-the-fly using DotNetZip and sent to the user.
If I just have the code save the zip to a local file and I double-click it, I can install the gadget without issue. But if I save the gadget to Response.OutputStream and try to open it (whether I open it from the browser or save it and then open it)
Windows won't install the gadget - it says it is not a valid gadget file.
I can open up both files with 7Zip and they look indentical. In fact if I unzip it and zip up those files, it'll build a gadget file that'll work. But the file saved to disk is about 80 characters larger than the one saved to the stream.
Any ideas what could be wrong? Whatever the difference is, it doesn't seem to matter to 7zip but it does to Windows as it tries to process the gadget file.
BTW I'm running Windows 7 x64. Tested with both IE and Firefox.