title: WCF Stream length
body: <p>I have the following code to send a (file) stream to a wcf client:</p>
  
  <pre><code> public Stream Download( string path )
      {
  
          try
          {
              FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read);
  
              return stream;
  
          }
          catch (Exception ex)
          {
              string error = ex.Message;
  
              return null;
          }
      }
  </code></pre>
  
  <p>I want to be able to get the length of the sent stream at the client end, but the Stream class does not support this.  </p>
  
  <p>What would be the best way of doing it?</p>
  
  <p>Thanks,
  Tony</p>