title: MemoryStream data corruption issue
body: <p>I have created a simple REST based WCF service which runs on <code>BasicHttpBinding</code>. In one of my webmethod, I am  returning a Stream which points to a JSON response. </p>
  
  <p>The Method looks like : </p>
  
  <pre><code>[OperationContract]
  [FaultContract(typeof(ApplicationFault))]
  [WebInvoke(Method = "POST", UriTemplate = "GetActiveCalls/{nurseid}")]
  Stream GetActiveCalls(string nurseid);
  </code></pre>
  
  <p>From the body of the <code>GetActiveCalls</code>, I am creating an object of <code>MemoryStream</code> and returning the same as response. The code looks like  </p>
  
  <pre><code>// Serialize the results as JSON
  string jsonResult = new JavaScriptSerializer().Serialize(baseResponses);
  
  // ContentType json
  WebOperationContext.Current.OutgoingResponse.ContentType = "application/json";
  WebOperationContext.Current.OutgoingResponse.Headers.Add("Cache-Control", "no-cache");
  var bytes = Encoding.UTF8.GetBytes(jsonResult);
  //Parse to memorystream
  var ms = new MemoryStream(bytes);
  ms.Seek(0, SeekOrigin.Begin);
  ms.SetLength(bytes.LongLength);
  return ms;
  </code></pre>
  
  <p>When trying this from client, I get result like</p>
  
  <pre><code>{"LastEvents":[{"FormatValues":"Klic 2 3 4","Icon":null,"Color":"Red","Acknowledged":false,"EventID":28566}],"Message":"","Status":true}
  </code></pre>
  
  <p>But sometimes after invoking the same method for multiple times, I start getting the response as : </p>
  
  <pre><code>{"LastEvents":[{"FormatValues":"Klic 2 3 4","Icon":null,"Color":"Red","Acknowledged":false,"EventID":28566}],"Message":"","Statu{"LastEv
  </code></pre>
  
  <p>You can see after <code>"Statu</code> on the JSON response, the stream gets reset and starts getting data from the beginning. </p>
  
  <p>It looks strange to me. </p>
  
  <p>*From server side, when I put breakpoint, it seems the <code>MemoryStream</code> has correct response.</p>