Let me tell you the definition of two and then explain the main difference.
Windows Communication Foundation(WCF):
WCF stands for Windows Communication Foundation. WCF is a unified programming model for building service oriented application. WCF is the next generation of distributed applications and Web Services. It consist of a runtime and classes in System.ServiceModel namespace.
Web Services:
Web Services are business logic compnents, which provide functionality via the internet using standard protocols such as HTTP. Web Services uses Simple Object Access Protocol (SOAP) in order to expose the business functionality. SOAP defines a standardized format in XML.
Differences:
WCF | Web Services |
---|---|
While WCF Service or a WCF component can be invoked by any protocol (like http, tcp etc.) and any transport type. | Web services can only be invoked by HTTP (traditional webservice with .asmx). |
WCF are flexible. | Web Services not are flexible. |
WCF service can also maintain state and session. | WCF service can not maintain state and session. |