title: Does any one know about this error: "Wrong Local header signature: 0x6D74683C"?
body: <p>The following code is used to download a zip file and unzip it on phone. </p>
  
  <p>The same code used to work on WP7, I started tested on WP8 device, and strange thing is happening... now <strong>it works on WP8 but <em>NOT</em> on WP7</strong> anymore. </p>
  
  <p>On the WP7 it gives an <strong>ERROR</strong>:</p>
  
  <pre><code>Wrong Local header signature: 0x6D74683C
  </code></pre>
  
  <p>Could someone tell me what's wrong here?</p>
  
  <p><strong>THE OBSERVATION (2 days after posting the question)</strong></p>
  
  <p>I have some observations.... Sharing here in detail (<a href="https://docs.google.com/file/d/0B8xOhdKHzbkyMjlqTm94dXNaWDg/edit?usp=sharing">Image format</a>) or (<a href="https://docs.google.com/file/d/0B8xOhdKHzbkyeENJbTMwUG0wODQ/edit?usp=sharing">Excel format</a>)</p>
  
  <p><strong>THE CODE</strong></p>
  
  <pre><code>using ICSharpCode.SharpZipLib.Zip;
  using System;
  using System.Diagnostics;
  using System.IO;
  using System.IO.IsolatedStorage;
  using System.Net;
  
  namespace iq_main.Network
  {
  
      public class IQ_Download
      {
          private string zipFilePassword = String.Empty;
          private string fileNameToBeStoredAs = String.Empty;
          private string urlToBeDownloaded = String.Empty;
          private HttpWebResponse response;
  
          public void Download(string _urlToBeDownloaded = GlobalConstants.DownloadLanguageConfigurationUrl, string _fileNameToBeStoredAs = GlobalConstants.DownloadLanguageConfigurationXmlFilename, string _zipFilePassword = GlobalConstants.DownloadZipsPassword)
          {
  
              urlToBeDownloaded = _urlToBeDownloaded; 
              fileNameToBeStoredAs = _fileNameToBeStoredAs;
              zipFilePassword = _zipFilePassword;
  
              System.Uri targetUri = new System.Uri(urlToBeDownloaded);
              HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(targetUri);
  
              request.BeginGetResponse(new AsyncCallback(WebRequestCallBack), request);
          }
  
  
          void WebRequestCallBack(IAsyncResult result)
          {
              HttpWebRequest resultInfo = (HttpWebRequest)result.AsyncState;
              response = (HttpWebResponse)resultInfo.EndGetResponse(result);
              try
              {
  
                  using (StreamReader httpwebStreamReader = new StreamReader(response.GetResponseStream()))
                  {
                      //open isolated storage to save files
                      using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
                      {
                          using (ZipInputStream s = new ZipInputStream(httpwebStreamReader.BaseStream))
                          {
                              if (zipFilePassword != String.Empty)
                                  s.Password = zipFilePassword;//if archive is encrypted
  
                              ZipEntry theEntry;
                              try
                              {
  //EXCEPTION OCCURS ON THE VERY NEXT LINE (while...)    
                                  while ((theEntry = s.GetNextEntry()) != null)
                                  {
                                      string directoryName = Path.GetDirectoryName(theEntry.Name);
                                      string fileName = Path.GetFileName(theEntry.Name);
                                      fileName = fileNameToBeStoredAs;
  
                                      // create directory
                                      if (directoryName.Length &gt; 0)
                                      {
                                          isoStore.CreateDirectory(directoryName);
                                          //Directory.CreateDirectory(directoryName);
                                      }
  
                                      if (fileName != String.Empty)
                                      {
  
                                          //save file to isolated storage
                                          using (BinaryWriter streamWriter =
                                                  new BinaryWriter(new IsolatedStorageFileStream(theEntry.Name,
                                                  FileMode.Create, FileAccess.Write, FileShare.Write, isoStore)))
                                          {
  
                                              int size = 2048;
                                              byte[] data = new byte[2048];
                                              while (true)
                                              {
                                                  size = s.Read(data, 0, data.Length);
                                                  if (size &gt; 0)
                                                      streamWriter.Write(data, 0, size);
                                                  else
                                                      break;
                                              }
                                          }
                                      }
                                  }
                              }
                              catch (ZipException ze)
                              {
                                  Debug.WriteLine(ze.Message);
                              }
                          }
                      }
                  }
              } //try
              catch (Exception ex)
              {
                  Debug.WriteLine(ex.Message);
              }
  
          }//WebRequestCallBack Method */
      } //Class ends
  }
  </code></pre>
  
  <p>THE OUTPUT STACK</p>
  
  <pre><code>    Step into: Stepping over method without symbols 'string.operator !='
      Step into: Stepping over method without symbols 'ICSharpCode.SharpZipLib.Zip.ZipInputStream.Password.set'
      Step into: Stepping over method without symbols 'string.operator !='
      Step into: Stepping over method without symbols 'ICSharpCode.SharpZipLib.Zip.ZipInputStream.Password.set'
      Step into: Stepping over method without symbols 'ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry'
      A first chance exception of type 'ICSharpCode.SharpZipLib.Zip.ZipException' occurred in SharpZipLib.WindowsPhone7.dll
      Step into: Stepping over method without symbols 'System.Exception.Message.get'
      Step into: Stepping over method without symbols 'System.Diagnostics.Debug.WriteLine'
      Wrong Local header signature: 0x6D74683C
      A first chance exception of type 'ICSharpCode.SharpZipLib.Zip.ZipException' occurred in SharpZipLib.WindowsPhone7.dll
      Wrong Local header signature: 0x6D74683C
  </code></pre>