title: Error "This stream does not support seek operations" in C#
body: <p>I'm trying to get an image from an url using a <code>byte</code> stream. But i get this error message:</p>
  
  <blockquote>
    <p>This stream does not support seek operations.</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>byte[] b;
  HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url);
  WebResponse myResp = myReq.GetResponse();
  
  Stream stream = myResp.GetResponseStream();
  int i;
  using (BinaryReader br = new BinaryReader(stream))
  {
      i = (int)(stream.Length);
      b = br.ReadBytes(i); // (500000);
  }
  myResp.Close();
  return b;
  </code></pre>
  
  <p>What am i doing wrong guys?</p>