I'm returning some images as a stream as part of a WebOperationContext.Current.CreateStreamResponse()
I was wondering if the framework handles the closing of this stream after it gets returned. Or if there was something that you have to do as part of the response in order to close the stream correctly.
Thanks.
Implementing using is not a soulution here, i had a situation where the returning content was huge (3 MB) and because i wrapped the WebOperationContext.Current.CreateStreamResponse() inside a using statement, the stream got closed before the content finished, thus the response was blank for the client.
All i did was copy the stream output to a string and use WebOperationContext.Current.CreateTextResponse() inside the using wrap.