Let\'s say I have the following WCF implementation:
public Stream Download(string path)
{
FileStream stream = new FileStream(path, FileMode.Open, FileAcc
If you wrap the Stream in MessageContract (so you could sent more information in headers), beware that the Stream would not be disposed automatically! As the name of attribute OperationBehavior.AutoDisposeParameters suggests, WCF automatically disposes input/output parameters and thus you have to implement IDisposable on your MessageContract class and close the stream there.