I'm trying to use binary message encoding in a WCF service, following the many examples on this site.
On the server I have the binding declared as so:
<customBinding>
<binding name="binaryHttpBinding">
<binaryMessageEncoding maxReadPoolSize="4096000" maxSessionSize="4096000" maxWritePoolSize="4096000">
<readerQuotas maxDepth="32" maxStringContentLength="4096000"
maxArrayLength="4096000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binaryMessageEncoding>
<httpTransport maxBufferPoolSize="4096000" maxBufferSize="4096000" maxReceivedMessageSize="4096000"/>
</binding>
</customBinding>
The service is set to use it (I think):
<service behaviorConfiguration="MyService.ServiceBehavior" name="MyService.ContentUploadService">
<endpoint
address=""
binding="customBinding"
bindingConfiguration="binaryHttpBinding"
contract="MyService.IContentUpload"
name="MyService.ContentUploadService" />
The client has the same declarations:
<customBinding>
<binding name="binaryHttpBinding">
<binaryMessageEncoding maxReadPoolSize="4096000" maxSessionSize="4096000" maxWritePoolSize="4096000">
<readerQuotas maxDepth="32" maxStringContentLength="4096000"
maxArrayLength="4096000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binaryMessageEncoding>
<httpTransport maxBufferPoolSize="4096000" maxBufferSize="4096000" maxReceivedMessageSize="4096000"/>
</binding>
</customBinding>
And:
<endpoint
address="http://foo.com/ContentUploadService.svc"
binding="customBinding"
bindingConfiguration="binaryHttpBinding"
contract="MyService.IContentUpload"
name="MyService.ContentUploadService"/>
The client appears to be working, but the server throws an exception that indicates that the binding is not in place:
Content Type application/soap+msbin1 was sent to a service expecting text/xml; charset=utf-8. The client and service bindings may be mismatched.
Immediately prior to this error in the log file is this one, thrown when trying to open the service host, which must be the cause.
Configuration evaluation context not found.
None of the search links I've tried for this message have been helpful. So, what basic piece am I missing?