title: Retrieving a doc from a website by httpwebrequest, does return no query
body: <p>There is public website where i want to retrieve one document programmatically, doing it by browser is working perfectly but doing it by code returns "NO Query".</p>
  
  <p>Could anyone check it out, what am i doing wrong, honestly im stuck on it few days ...</p>
  
  <p>Here is the code:</p>
  
  <pre><code>string fileUrl = @"http://docsonline.wto.org/imrd/directdoc.asp?DDFDocuments/t/G\SPS\NALB149.doc";
              Uri uri = new Uri(fileUrl);
  
              HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
  
              using (HttpWebResponse webResponse = (HttpWebResponse)request.GetResponse())
              {
  
                  using (Stream responseStream = webResponse.GetResponseStream())
                  {
                      if (responseStream != null)
                      {
                          using (MemoryStream memoryStream = new MemoryStream())
                          {
                              byte[] buffer = new byte[8192];
                              int bytesRead;
                              while ((bytesRead = responseStream.Read(buffer, 0, buffer.Length)) &gt; 0)
                              {
                                  memoryStream.Write(buffer, 0, bytesRead);
                              }
                              memoryStream.Seek(0, SeekOrigin.Begin);
  
                              string fileName = fileUrl.Substring(fileUrl.LastIndexOf("/") + 1, fileUrl.Length - fileUrl.LastIndexOf("/") - 1).Replace(@"\", "_");
  
                              using (FileStream fileStream = System.IO.File.Create(@"C:\temp\" + fileName, (int)memoryStream.Length))
                              {
                                  // Fill the bytes[] array with the stream data
                                  byte[] bytesInStream = new byte[memoryStream.Length];
                                  memoryStream.Read(bytesInStream, 0, (int)memoryStream.Length);
  
                                  // Use FileStream object to write to the specified file
                                  fileStream.Write(bytesInStream, 0, bytesInStream.Length);
                              }
                          }
                      }
                  }
              }
  </code></pre>
  
  <p>As you can see there is a link to a file which i want to retrieve, could anyone try it out?</p>
  
  <p>Maybe will have more luck than me ...</p>
  
  <p>Waiting for response</p>