15
Reply

what is difference between webservice & WCF .

Lalit Raghav

Lalit Raghav

9y
3.7k
1
Reply

    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.

    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.

    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.

    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.

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

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

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

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

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

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

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

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

    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.

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

    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.