title: Wrong WebFaultException when using a Stream and closing the stream
body: <p>We have a REST API, built with WCF. </p>
  
  <p>We handle all the exceptions backend with WebFaultException like this: </p>
  
  <pre><code>throw new WebFaultException&lt;string&gt;(e.Message, HttpStatusCode.NotAcceptable);
  </code></pre>
  
  <p>This works just fine except in one scenario where we do a Post, with a stream. </p>
  
  <p><strong>An example of this:</strong></p>
  
  <pre><code>[WebInvoke(Method = "POST", UriTemplate = "saveUser?sessionId={sessionId}&amp;userId={userId}",
          RequestFormat = WebMessageFormat.Json,
          ResponseFormat = WebMessageFormat.Json,            
          BodyStyle = WebMessageBodyStyle.WrappedRequest)]
      [OperationContract]
      string SaveUser(string sessionId, int userId, Stream stream);
  </code></pre>
  
  <p>When handling this stream in a using statement, whenever we then run into an exception we keep getting: </p>
  
  <p><strong>From Fiddler:</strong> </p>
  
  <pre><code>HTTP/1.1 400 Bad Request 
    &lt;p&gt;The server encountered an error processing the request. The exception message is 'The message object has been disposed.'. See server logs for more details. The exception stack trace is: &lt;/p&gt;
    &lt;p&gt;  at System.ServiceModel.Channels.ByteStreamMessage.InternalByteStreamMessage.get_Properties()
     at System.ServiceModel.OperationContext.get_IncomingMessageProperties()
     at System.ServiceModel.Dispatcher.WebErrorHandler.ProvideFault(Exception error, MessageVersion version, Message&amp;amp; fault)&lt;/p&gt;
  </code></pre>
  
  <p>Looks like it has something to do with the stream and StreamReader being disposed. </p>
  
  <p>I have then tried to remove anything that will dispose the StreamReader, and this acctualy works. The code handling this now looks like this: </p>
  
  <p><img src="https://i.stack.imgur.com/YN4gw.jpg" alt="enter image description here"></p>
  
  <p>This solves the problem with sending correct exception messages, but how bad will this affect our application, not closing or disposing our StreamReader? 
  Do you see any other ways of solving this ? </p>