Diagnosing mismatched bindings (Dual Http)

Something we do a pretty poor job of in the November CTP but are actively working on fixing is helping users diagnose when their client and server have mismatched bindings. I often get teased that all we get back is “connection was aborted” which can mean anything from mismatched binding to my hard drive exploded. One particular exception that came up today was:

ProtocolException(“The HTTP response in the SOAP-over-HTTP one-way binding must not contain an entity body.”)

This likely means that you have WsDualHttpBinding on the client, but WsHttpBinding on the server. So your client is expecting a “202 Accepted” to signal that the one-way message was accepted, but the server is sending the method response on this back channel. We detect the mismatch and throw. Of course, our error message isn’t all that helpful. But now if someone does a web search for the exception, hopefully they can find out what went wrong 🙂 Look for a better exception message in a future drop.

Leave a Reply

Your email address will not be published. Required fields are marked *