It could be asked in various form like Why WCF is better than Web Services
WCF and Web Services both are the implementation of SOA (Service Oriented Architecture), both are SOAP-based services.
WCF supports other formats as well apart from SOAP but Web Service support SOAP only.
As we know there are various techniques to create distributes system. Some of them are Web Service,.Net Remoting.
Sometimes there may be the scenario that which technology should we use to develop a distributed application. And if there is a requirement for enhancement then how difficult would it be to switch over among technologies.
WCF is the solution for all these queries. WCF is the unified technology to create a distributed system which is not dependent on OS platform, Protocols to use and many more.
Let’s look at differences between WCF and Web Service.
Read this - What is Microservice Architecture?
WCF | Web Service |
Multiple hosting options – IIS, Self Hosting, WAS Hosting | IIS hosting is the only option |
HTTP, TCP, MSMQ, Named Pipe protocol supported | HTTP and HTTPS only |
Multiple message pattern like XML, JSON, Plain Text format supported | Support XML only. |
WCF supports REST Pattern | Web service does not support REST |
WCF has the various contract like Operation Contract, Data Contract, Message Contract, Fault Contract | Web Services has Web Methods |
WCF was released in .Net framework 3.0 | Web Service was released in ASP.Net 2.0 |
WCF uses ServiceBehavior class to support multithreading | Web Service does not support multi-threading |
WCF service uses [Servicecontract], [OperationContract] attributes | Web Service uses [WebMethod] attributes |
Keep following SharePointCafe.net for updated blogs.
Related blogs to WCF Service-
- Introduction to WCF
- ABC of WCF
- Basics of WCF Architecture
- WCF vs Web Service
- What is XML serialization?
- WCF Binding
- Create first WCF application
- Fault Contract in
- WCF Data Contract vs Message Contract
- Message Contract
- Data Contract Serialization and De-Serialization
- Data Contract in WCF
- Operation Contract in WCF
- Service Contract in WCF
- How to host a WCF service in IIS?
- WAS Hosting in WCF
- Self Hosting in WCF
- How to create WCF RESTful Service.