Tuesday, 28 August 2018

Difference between Web Services and WCF Services?

Web Services vs WCF Services:

Web Services :
  1.   It is introduced in .net 1.0.
  2. ASP.NET Web services send and receive messages by using SOAP over HTTP or HTTPS.
  3. Extension .asmx.
  4. ASP.NET Web services rely on the XmlSerializer in System.XML.Serialization namespace for serialization .
  5. Web service Class  using [WebService] and Web Method using [web method].
  6. Web service can be hosted in IIS only.
  7. Clients for ASP.NET Web services are generated using a command-line tool named WSDL.exe.
  8. Web services don’t support multi-threading.
  9. Performance wise web services are slower than WCF service. 


WCF Services :
  1. It is introduced in .net 3.0 .
  2. 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.
  3. Extension .svc
  4. WCF using  System.Runtime.Serialization namespace for serialization.
  5. WCF Service Class using [ServiceContract] , Method using [OperationContract] and Properties using [DataMember].
  6. WCF services can be hosted in IIS , WindowsActivation Services(WAS), Managed Windows services or self hosting etc.
  7. WCF uses ServiceModelMetadata Utility tool,svcutil.exe for the same purpose.
  8. WCF services Support multi-threading by using ServiceBehaviour class.
  9. Performance wise WCF services are faster than web service

No comments:

Post a Comment

Top Agile Interview Questions & Answers

Top Agile Interview Questions & Answers 1. What is Agile Testing? The first question of agile interview question tests your k...