Server: (read from the stream)
<wsHttpBinding>
<binding
name="BindingThing"
messageEncoding="Mtom"
maxReceivedMessageSize="33554432"
/>
</wsHttpBinding>
Client: (sends to the stream)
<wsHttpBinding>
<binding name="WSHttpBinding"
messageEncoding="Mtom"
maxReceivedMessageSize="33554432"
>
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
My method signature is:
public void AddFile(System.IO.Stream request)
Some of my request go well. Things can be serialized and deserialized when I use a stream object. But sometimes I get the exception: "End of Stream encountered before parsing was completed." from the BinaryFormatter.Deserialize(request);.
I think I'm doing something wrong with the configuration of WCF, but I can't figure out what. Does anyone know what I'm doing wrong here