Question

I implemented this contract

[OperationContract]
[WebGet(UriTemplate = "{parameter}", BodyStyle= WebMessageBodyStyle.Bare)]
byte[] Operation(string parameter);

But, when I called the implementation, all I got was something like this:

<base64Binary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">dGVzdA==</base64Binary>

Can't I remove this wrapper and this serialization?

Was it helpful?

Solution

Make it return Stream.

Stream Operation(string parameter)
{
   ...
   new MemoryStream(bytes);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top