Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Why Use Windows Communication Foundation/Feature of WCF?

A distributed application built with Web services is a service-oriented application. ASP.NET Web Services (ASMX) has been available for building Web services since .NET was first released. Why then do you need Windows Communication Foundation? WCF provides a number of benefits over ASP.NET Web Services, including:

  • Support for sending messages using not only HTTP, but also TCP other network protocols.
  • The ability to switch message protocols with minimal effort.
  • Support for hosting services on hosts other than a Web server.
  • Built-in support for the latest Web services standards (SOAP 1.2 and WS-*) and the ability to easily support new ones.
  • Support for security, transactions and reliability.
  • Support for sending messages using formats other than SOAP, such as Representational State Transfer (REST).

WCF:Configuring Service Endpoints

Hardcoding endpoint information into the host application is not ideal since endpoint details may change over time. It's not hard to imagine how you could store the endpoint information in a configuration file or database and read it while initializing ServiceHost. Since this is a common need, WCF automatically provides this functionality through the predefined configuration section.
The following configuration file defines the same two endpoints that were specified by calling AddServiceEndpoint:












Configuring Transport Security





...