Web Services vs WCF Services:
WCF Services :
Web Services :
- It is introduced in .net 1.0.
- ASP.NET Web services send and receive messages by using SOAP over HTTP or HTTPS.
- Extension .asmx.
- ASP.NET Web services rely on the XmlSerializer in System.XML.Serialization namespace for serialization .
- Web service Class using [WebService] and Web Method using [web method].
- Web service can be hosted in IIS only.
- Clients for ASP.NET Web services are generated using a command-line tool named WSDL.exe.
- Web services don’t support multi-threading.
- Performance wise web services are slower than WCF service.
WCF Services :
- It is introduced in .net 3.0 .
- WCF services use SOAP by default, but the messages can be in any format, and conveyed by using any transport protocol like HTTP,HTTPs, WS- HTTP, TCP, Named Pipes, MSMQ, P2P(Point to Point) etc.
- Extension .svc
- WCF using System.Runtime.Serialization namespace for serialization.
- WCF Service Class using [ServiceContract] , Method using [OperationContract] and Properties using [DataMember].
- WCF services can be hosted in IIS , WindowsActivation Services(WAS), Managed Windows services or self hosting etc.
- WCF uses ServiceModelMetadata Utility tool,svcutil.exe for the same purpose.
- WCF services Support multi-threading by using ServiceBehaviour class.
- Performance wise WCF services are faster than web service
No comments:
Post a Comment