title: Silverlight HttpWebRequest syncronous call
body: <p>In my silverlight app I do a file upload. I break the file into chunks and then I upload each chunk. The problem is that I want to use the HttpWebRequest synchronously. My propblem is to ensure that all request are ok and to catch exceptions. Is that possible in Silverlight? I would like sopmething like:</p>
  
  <pre><code>while(chunk)
  {
      try{
      HttpWebRequest req = ...
      req.BeginGetRequestStream(new AsyncCallback(WriteCallback), req);
      //add data into request stream
      req.BeginGetResponseStream(new AsyncCallback(ReadCallback), req);
      //parse the response
      chunk = new Chunk();
      }catch(Exception ex)
      {...}
  }
  </code></pre>
  
  <p>Can you give me a hint how can I obtain this?</p>
  
  <p>Thanks, 
  Radu D</p>