Difference between WCF and Web Service


   In this blog I am listing few differences between WCF and Web Service. A lot from us gets confused which is the best out these two to use. Please have a look on the below table and find yourself what to choose and why.

WebService
WCF
         · WebService and WebMethod attributes are used for defining web service.
          · ServiceContract and OperationContract attributes are used for defining WCF service.
          · Support security but is less secure as compared to WCF.
          · Supports security, reliable messaging, transaction and AJAX and REST supports.
          · Supports XML serializer by using System.Xml.Serialization.
          · Supports DataContract serializer by using System.Runtime.Serialization.
          · Supports One-Way and Request-Response service operations.
          · Supports One-Way, Request-Response and Duplex service operations.
          · Web Services are slower than WCF
          · WCF are faster than Web Services.
          · Hash Table cannot be serialized. It can serializes only those collections which implement IEnumerable and ICollection.
          · Hash Table can be serialized.
          · Unhandled Exceptions returns to the client as SOAP faults.
         · Unhandled Exceptions does not return to the client as SOAP faults. WCF supports better exception handling by using FaultContract.
          · Doesn’t support multi-threading.
         · Supports multi-threading by using ServiceBehaviour class.
          · Supports XML and MTOM (Message Transmission Optimization Mechanism) message encoding.
         · Supports XML, MTOM, Binary message encoding.
          · Web Services are hosted in IIS by pointing the ASMX file to the virtual directory.
          
       · WCF provides more options for hosting,  It combines old hosting options with new ones like hosting on WAS. WCF applications can also be hosted in the following ways:
1)      Self-hosting
2)      Windows Service
3)      IIS and WAS

Comments

  1. Etsy is no longer supporting older variations of your net browser to be able to} make sure that|be positive that} user information stays secure. Featured News Sign Up to Receive GrabCAD's types of bras Digital Thread Weekly Newsletter GrabCAD provides a wealth of helpful data and knowledge – and we wish to share the very best of it with you week in and week out! The Digital Thread is GrabCAD’s free weekly publication to assist make your life easier. The largest on-line ecosystem of professional engineers, producers, college students and software program partners. Continuous operations are activities of an organization may be} ongoing and sustained within the occasion of a enterprise disruption.

    ReplyDelete

Post a Comment

Popular posts from this blog

Search data in Gridview on Textbox Key press event using JQuery in Asp.Net- C#

StateCode and StatusCode Values for mostly used entities in Microsoft Dynamics CRM 2013

Dumps for Microsoft Dynamics CRM MB2-703 Practice Exam Questions Free

How to show enlarge image when mouse hover on image or link in Asp.Net(c#) using JavaScript

How to import CSV files into DataTable in C#

go to top image