0 votes
in C Sharp by

Following are the main difference b/w them

(1)To define WCF service ServiceContract and OperationContract attributes are used.

(2)WCF supports varioud protocols like HTTP, HTTPS, TCP, MSMQ and Named Pipes.

(3)We can host WCF application in 4 ways

(i)IIS

(ii)WAS

(iii)Self Hosting

(iv)Windows Service

(4)WCF is more securable then WebServices and also used for Messaging, Reliability and for transaction for AJAX and REST supports.

(5)We can serialize DataCOntract by using System.Runtime.Serialization.

(6)WCF supports different service operations like One-Way, Request-Response and Duplex service operations.

(7)WCF much faster then Web Services.

(8)Here in WCF HashTables can be serialized.

(9)WCF supports Multi-threading with the help of ServiceBehaviour class.

(10)Its supports encoding like XML,MTOM and Binary message encoding.

(11)WCF have better exception handling by using FaultContract. And will does return client the unHandled Exceptions.

ASP.NET

(1)We use WebService and WebMethod attributesfor defining Web Services.

(2)WebService will support only HTTP, HTTPS protocols.

(3)We can host this in IIS only.

(4)Secuirty is less secure as copared to WCF.

(5)Here we can have option like XML serializer by using System.XML.Serialization.

(6)It supports only 2 service operations like One-Way and Request-Reponse.

(7)WEB Service are slower than WCF.

(8)Here HashTables will not be serialized. It can serialize only those collections which implement IEnumerable and ICollection.

(9)It doesnot support Multi-Threading.

(10)It supports XML and MTOM message encoding only.

(11)Here unHandled Exception returns to the client as SOAP Faults.

Related questions

0 votes
asked Aug 12, 2020 in C Sharp by RShastri
0 votes
0 votes
0 votes
asked Apr 14, 2020 in C Sharp by GeorgeBell
...