I'm facing a funny issue with WCF response serialization. After a number of requests (let's say 10), WCF starts to mix-up requests and always after the 128th character when using Utf8 encoding.
Expected response:
<via version="1.1">
<response>
<status code="0" />
<res-get-balance>
<balance value="38.65" currency="GBP" />
<token>IQV2SSc41Fux6zWeaaUOMKtBvYW3IgtDZFJ4r1</token>
</res-get-balance>
</response>
</via>
However I got this as a response:
<via version="1.1">
<response>
<status code="0" />
<res-get-balance>
<balance value="38.65" currency="GBP" />
<token>IQV2SSc41Fux6zWe
<via version="1.1">
<response>
<status code="0" />
<res-get-balance>
<balance value="38.65" currency="GBP" />
<token>IQ
When it reaches character number 128 it starts from the beginning.
Here is my binding configuration:
<webHttpBinding>
<binding name="webHttpBindingConfig" sendTimeout="05:00:00" ></binding>
</webHttpBinding>
Here is my behavior configuration:
<behavior name="webXmlOverHttpBehavior">
<dataContractSerializer maxItemsInObjectGraph="165536" />
<endpointDiscovery enabled="true" />
<webHttp helpEnabled="true" defaultOutgoingResponseFormat="Xml" />
</behavior>
My service implementation has the following attribute:
[ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single)]
Any ideas?