Lalit Raghav
what is difference between webservice & WCF .
By Lalit Raghav in WCF on Jun 23 2015
  • Sharad
    Jun, 2015 28

    Abbreviations: WCF-for Windows Communication foundation and WS for Web Services. WCF: ServiceContract and OperationContract attributes are used for defining WCF-service. WS: WebService and WebMethod attributes are used for defining web service. ------------------------------------------------------------------------------------------------------------------------------ WCF: Supports various protocols like HTTP, HTTPS, TCP, Named Pipes and MSMQ. WS :Supports only HTTP, HTTPS protocols. ------------------------------------------------------------------------------------------------------------------------------ WCF: Hosted in IIS, WAS (Windows Activation Service), Self-hosting, Windows Service. WS : Hosted only in IIS. ------------------------------------------------------------------------------------------------------------------------------ WCF: Supports security, reliable messaging, transaction and AJAX and REST supports. WS: Support security but is less secure as compared to WCF. ------------------------------------------------------------------------------------------------------------------------------ WCF: Supports DataContract serializer by using System.Runtime.Serialization. WS: Supports XML serializer by using System.Xml.Serialization. ------------------------------------------------------------------------------------------------------------------------------ WCF: Supports One-Way, Request-Response and Duplex service operations. WS : Supports One-Way and Request-Response service operations. ------------------------------------------------------------------------------------------------------------------------------ WCF: Hash Table can be serialized. WS : Hash Table cannot be serialized. It can serializes only those collections which implement IEnumerable and ICollection. ------------------------------------------------------------------------------------------------------------------------------ WCF: Unhandled Exceptions does not return to the client as SOAP faults. WCF supports better exception handling by using FaultContract. WS: Unhandled Exceptions returns to the client as SOAP faults. ------------------------------------------------------------------------------------------------------------------------------ WCF : Supports XML, MTOM, Binary message encoding. WS : Supports XML and MTOM (Message Transmission Optimization Mechanism) message encoding. ------------------------------------------------------------------------------------------------------------------------------ WCF : Supports multi-threading by using ServiceBehaviour class. WS: Doesn't support multi-threading.

    • 3
  • Deepak Verma
    May, 2018 28

    There are some major differences that exist between WCF and a Web service which are listed below.Attributes - WCF service is defined by ServiceContract and OperationContract attributes, whereas a web service is defined by WebService and WebMethod attributes.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 are there for WCF hosting, i.e., IIS (Internet Information Service), WAS (Windows Activation Service), Self-hosting and Windows Service, but a web service is hosted only by IIS.Services - WCF supports a robust security, trustworthy messaging, transaction and interoperability, while a web service only supports security services.Serializer - WCF Supports DataContract serializer by employing System.Runtime.Serialization, whereas a web service supports XML serializer by making use of System.Xml.Serialization.Tools - ServiceMetadata tool (svcutil.exe) is used for 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 are handled in a better way by making use of FaultContract. They do not return to the client like in a web service as SOAP faults.Hash Table - It is possible to serialize a Hash Table in WCF, but this is not the case in a web service.Bindings - WCF supports several types of bindings like BasicHttpBinding, WSDualHttpBinding, WSHttpBinding, etc., while a web service supports only SOAP or XML.Multithreading - WCF supports multithreading by using the ServiceBehavior Class, whereas this is not supported in a web service.Duplex Service Operations - WCF supports duplex service operations apart from supporting one-way and request-response service operations, whereas a web service does not support duplex service operations.

    • 1
  • Sujeet Suman
    Jun, 2015 26

    Web Services: It is used to exchange messages using the SOAP via HTTP only. WCF Service: It is used to exchange messages using any format via any transport protocol like HTTP, TCP/IP, MSMQ, Net Named Pipes.

    • 1
  • Sridhar Sharma
    Nov, 2015 12

    WCF follows WS* specifications meaning, it supports transactions, sessions, MEP (Message Exchange Patterns : One Way, Duplex and Request Reply), security, these features are not being supported by Web Services. WCF can be hosted in IIS, WAS and Windows Service but Web Services can be hosted only in IIS.

    • 0
  • maulik patel
    Nov, 2015 3

    1. Web services hosted on IIS only where as WCF have self hosting,IIS hosting,WAS hosting. 2. Web services support only http protocol.WCF support http,https,tcp/ip,net named pipe,MSMQ.

    • 0
  • Nitin Kumar
    Jul, 2015 31

    Follow the Link - http://wcftutorial.net/Difference-between-WCF-and-Webservice.aspx

    • 0
  • Nitin Kumar
    Jul, 2015 31

    Please follow the link - http://wcftutorial.net/Difference-between-WCF-and-Webservice.aspx

    • 0
  • Ashraf Ansari
    Jul, 2015 29

    http://www.codeproject.com/Articles/139787/What-s-the-Difference-between-WCF-and-Web-Services

    • 0
  • Ashraf Ansari
    Jul, 2015 29

    http://www.codeproject.com/Articles/139787/What-s-the-Difference-between-WCF-and-Web-Services

    • 0
  • Ashraf Ansari
    Jul, 2015 29

    http://www.codeproject.com/Articles/139787/What-s-the-Difference-between-WCF-and-Web-Services

    • 0
  • Ashraf Ansari
    Jul, 2015 29

    http://www.codeproject.com/Articles/139787/What-s-the-Difference-between-WCF-and-Web-Services

    • 0
  • Ashraf Ansari
    Jul, 2015 29

    http://www.codeproject.com/Articles/139787/What-s-the-Difference-between-WCF-and-Web-Services

    • 0
  • Santhakumar Munuswamy
    Jul, 2015 12

    http://www.c-sharpcorner.com/UploadFile/f2823e/difference-between-web-service-and-wcf/

    • 0
  • Sharad Gupta
    Jul, 2015 9

    WCF: 1. WCF is part of .Net Technologies. 2. WCF is unified programming model to work with different distributed technologies like WebService, Remoting and MSMQ. 3. WCF can work on different protocol like SOAP, TCP/IP, MSMQ, Net Named Pipes.Web Service: 1. Web Services can be created regardless of programming language. 2. It works only on SOAP protocol.

    • 0
  • Munesh Sharma
    Jun, 2015 28

    http://www.dotnet-tricks.com/Tutorial/wcf/cH1H200314-Difference-between-WCF-and-ASP.NET-Web-Service.html

    • 0
  • Rajeesh Menoth
    Jun, 2015 27

    WCF1)Hosted in IIS, WAS (Windows Activation Service), Self-hosting, Windows Service. 2)WCF are faster than Web Services. 3)Hash Table can be serialized. 4)Supports DataContract serializer by using System.Runtime.Serialization.ASP.NET Web Service1)Hosted only in IIS. 2)Web Services are slower than WCF 3)Hash Table cannot be serialized. It can serializes only those collections which implement IEnumerable and ICollection. 4)Supports XML serializer by using System.Xml.Serialization.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS