Difference between Web Service and WCF | ASP.Net Web Service vs. WCF
Poonam Dhanvani
October 28, 2013
Difference between Web Service and WCF | ASP.Net Web Service vs. WCF2016-06-06T07:49:52+00:00
.NET Tutorials, Difference Between
Difference between Web Service and WCF
Web Services |
WCF |
|
---|---|---|
Definition | ‘Web Service’ is a method of communicating over the WWW between two or more devices. | WCF : ‘Windows Communication Foundation’ is a framework for building the Service Oriented Aplications. |
Release | Web Services was released with ASP.Net 2.0. | WCF was released with .NET Framework 3.0. |
Hosting | ASP.Net web services are hosted in Internet Information Services : IIS. | WCF is hosted in IIS ,WAS : Windows Activation Services, Windows service and also supports ‘Self-hosting’. |
File Extension |
Web Services in Asp.net have “.asmx” file extension. | WCF have “.svc” file extension. |
Protocol Supports | ASP.Net web services accessed through HTTP : Hyper Text Transfer Protocol. | WCF can be accessed through HTTP, TCP, MSMQ : Message Queuing and Point to Point (P2P). |
Services | Provides Security services. | Not only supports security but also AJAX, REST, Reliable messaging, transactions |
Multi-Threading | Web Services does not support multi-threading. | WCF supports multi-threading using “ServiceBehavior class”. |
Serialization | For data transformation web services use ‘XML serializer’ and namespace “System.XML.Serialization” | For data transformation WCF uses ‘DataContractSerializer ‘ and namespace ‘System.RunTime.Serialization’. |
Messaging | Web services in Asp.Net use only SOAP : Simple Object Access Protocol for messaging. | WCF uses SOAP (Default) but also support other protocols for messaging. |
Performance | Web services are slower than WCF. | WCF is faster in compare to Web services. |
Limited serialization | Using web-services only public fields / Properties can be serialized and it can not serialize Hash table. | WCF can serialize public / private fields as well as Hash Table. |
Attributes | Web service use [WebService] and [WebMethod] attributes. | WCF uses [ServiceContraact] and [OperationContract] attributes. |
.NET Framework 3.0., .svc, [OperationContract], [ServiceContraact], [WebMethod], [WebService], AJAX, asmx, ASP.Net, ASP.Net 2.0, ASP.Net Web Service, ASP.Net Web Service vs. WCF, DataContractSerializer, Difference between Web Service and WCF, Hash table, HTTP, Hyper Text Transfer Protocol, IIS, Internet Information Services, Message Queuing and Point to Point, MSMQ, multi-threading, P2P, REST, Self-hosting, serializer, Service Oriented Architecture, ServiceBehavior class, Simple Object Access Protocol, soap, System.RunTime.Serialization, System.XML.Serialization, TCP, WAS, WCF, Web Services in Asp.net, Windows Activation Services, Windows Communication Foundation, XML, XML serializer