There is some major differences that exist between WCF and a Web service which is listed below.
Here's a summary of the main differences between WCF and network services
Protocols -WCF supports a range of protocols, i.e., HTTP, Named Pipes, TCP, and MSMQ, whereas a Web service only Supports HTTP protocol.
Hosting Mechanisms -Various activation mechanisms is there for WCF Hosting, i.e., IIS (Internet information Ser Vice), was (Windows Activation Service), self-hosting and Windows service, but a Web service are hosted only by IIS.
Services -WCF supports a robust security, trustworthy messaging, transaction and interoperability, while a Web s Ervice only supports security services.
Serializer -WCF Supports datacontract serializer by employing System.Runtime.Serialization, whereas a Web Servic E supports XML serializer by making use of System.Xml.Serialization.
Tools -servicemetadata tool (SvcUtil.exe) is used for the client generation for a WCF service, while WSDL. EXE tool is used for generating the same for a Web service.
Exception handling -in WCF, unhandled exceptions is handled in a better the by making use of faultcontract. They does not return to the client as a Web service as SOAP faults.
Has
1. Attributes: WCF services are defined by service contracts and operational contracts, whereas Web services are defined by the WebService and WebMethod properties
2. Protocol: WCF supports a range of protocols, such as HTTP, named pipes, message queues, but Web services only support HTTP protocols
3. Hosting mechanism: WCF has a variety of mechanisms available, such as IIS (Internet Information Services), was (Windows Activation Service), self-hosting (self-hosted), and Windows services, but webservice only supports IIS
4. Services: WCF provides a robust security, reliable messaging, transactional, and interoperability. However, WebService only supports security services
5. Serializer: WCF provides a data contract serializer by using System.Runtime.Serialization, however WebService is supported by using System.Xml.Serialization to support the XML serializer
6. Tool: SvcUtil.exe is used by the client to generate a WCF service, however WebService uses the WSDL.EXE tool
7. Exception handling: In WCF, unhandled exceptions are handled in a better way by Faultcontract. WCF does not return unhandled exceptions as SOAP faults to the client as WebService does
How are you doing
Wcf-versus Web Service