Windows Azure DownloadtoStream EOF error

Posted by david on Stack Overflow See other posts from Stack Overflow or by david
Published on 2010-03-30T18:08:06Z Indexed on 2010/03/30 18:13 UTC
Read the original article Hit count: 475

Filed under:
|

Hello, I've been using Windows Azure to create a document management system, and things have gone well so far. I've been able to upload and download files to the BLOB storage through an asp.net front end.

What I'm attempting to do now is allow users to upload a .zip file, and then take the files out of that .zip and save them as individual files. Problem is, I'm getting "ZipException was unhandled" "EOF in header" and I don't know why.

I'm using the ICSharpCode.SharpZipLib library which I've used for many other tasks and its worked great.

Here's the basic code: CloudBlob ZipFile = container.GetBlobReference(blobURI); MemoryStream MemStream = new MemoryStream(); ZipFile.DownloadToStream(MemStream); ....

while ((theEntry = zipInput.GetNextEntry()) != null)

and it's on the line that starts with while that I get the error. I added a sleep duration of 10 seconds just to make sure enough time had gone by.

MemStream has a length if I debug it, but the zipInput does sometimes, but not always. It always fails.

Thanks for any help.

Dave

© Stack Overflow or respective owner

Related posts about Azure

Related posts about windows-azure