Summary

This chapter started with an overview of how bindings work. I discussed each of the available standard bindings; listed the binding features that you may require in your applications; and explained how bindings build the channel stack. This chapter also explores core standard bindings by scenario: Internet scenarios for web service bindings; intranet scenarios for connection-oriented bindings; two-way communications and large message transfers; and custom bindings. From all of this discussion you should take away the following guidance:

  • Prefer WSHttpBinding for web service endpoints and use BasicHttpBinding in for backward compatibility with older web service stacks only. The configuration for WSHttpBinding will vary according to protocol support for sessions, reliable messaging, transactions, and security. These topics will be discussed in later chapters.

  • Use NetNamedPipeBinding for communications on the same machine, and NetTcpBinding to support calls across machine boundaries. You may also choose NetTcpBinding for same machine communications if you require support for non-Windows credentials. Chapter 7 will discuss this further.

  • Use WSDualHttpBinding if you need to support callbacks over HTTP.

  • Be mindful of expected message payload size and set binding configuration accordingly. Use MTOM protocol for large binary payloads over HTTP and Streaming to reduce memory overhead if you are working with file transfers.

  • Apply custom bindings only when the standard bindings do not support ...

Get Learning WCF now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.