Cannot Read That as a Zip File exception when trying to read a MemoryStream

Jul 29, 2012 at 5:01 PM
Edited Jul 29, 2012 at 5:02 PM

I am working on a HttpHandler that extracts a Zip File from my database and then streams a specific entry to the client. When using the current code I am getting an exception telling me that the Zip File could not read the memory stream.

I have used a breakpoint in Visual Studios to make sure that the stream is not empty, that it can be read an such and I cannot find anything that I would not expect.

Any help would be greatly appreciated.

Code:
http://pastebin.com/gHQcD0Dj