I am returning a memorystream in the form of a Stream from my wcf server.
When I retrieve that in the client and cast it back to MemoryStream,I get this error.
I don’t understand from where MessageBodyStream came from as I never used it.Can someone please tell me a solution for this problem?
Thank you.
This post suggests, that you need to read this stream into your MemoryStream first, if you want to access it as MemoryStream. Because any stream you send is received as MessageBodyStream.