Posts

Showing posts with the label Binding in WCF

What is netNamedPipeBinding in WCF ?

NetNamedPipeBinding is the best mechanism for interprocess communication. With netNamedPipeBinding the security can be achieved only through transport level security as it does not support message level security. However messages are secured as only the same machine can call the service operations. The reason netNamedPipeBinding is the best mechanism because it gives you the default security . NetTcpBinding best when clients are only from intranet. ======= in web.config of service ====== <services> <service name="NorthwindServices.CustomerService" behaviorConfiguration="ServiceBehavior"> <host> <baseAddresses> <add baseAddress="net.pipe://localhost/NorthwindServices/" /> </baseAddresses> </host> <endpoint address="CustomerService" binding="netNamedPipeBinding" contract="NorthwindServices.ICustomer" /> <endpoint address="CustomerService/mex" binding="...

What are the types of binding available in WCF?

A binding defines how an endpoint communicates to the world. A binding defines the transport (such as HTTP or TCP) and the encoding being used (such as text or binary). A binding can contain binding elements that specify details like the security mechanisms used to secure messages, or the message pattern used by an endpoint. WCF supports nine types of bindings. 1. Basic binding : Offered by the BasicHttpBinding class, this is designed to expose a WCF service as a legacy ASMX web service, so that old clients can work with new services. When used by the client, this binding enables new WCF clients to work with old ASMX services. 2. TCP binding : Offered by the NetTcpBinding class, this uses TCP for cross-machine communication on the intranet. It supports a variety of features, including reliability, transactions, and security, and is optimized for WCF-to-WCF communication. As a result, it requires both the client and the service to use WCF. 3. Peer network binding : Offered by the NetPe...