Difference Between Web Service And WCF

S.no Web ServiceWCF
[WebService],[WebMethod] attributes are required to declare the web services
[ServiceContract],[OperationContract] attributes are required to declare the WCF
2.Web Service supports only HTTP protocol and HTTPS protocolWCF supports the HTTP, HTTPS, TCP, MSMQ protocols.
3.Web service can be hosted only on IIS ServerWCF can support the Self Hosting, WAS Hosting, IIS Hosting
4.Web Service is less Secure compare with WCFWCF is high secure compare with Web Service
5.It supports the XML Serialization, i.e., using System.Xml.Serialization;It supports the Data Contract Serialization, i.e., using System.Runtime.Serialization
6.Web Service supports the one-way and request-reply communicationWCF supports the one way, Request reply, and Duplex communication.
7.HashTable cannot be serializedIn WCF, HashTable can be Serialized
8.In web service, whenever an exception occurs, the exception details are maintained in SOAP fault and send the exception to the client applicationIn WCF, whenever an exception occurs, the Exception information will not be sent to the client application
9.Web service does not support multi-threadingWCF supports the Multithreading
10We can directly test the web serviceIn order to test the WCF service, we need to consume the service in a client application
11Web Service extension is.ASMX (Active Server Extension)WCF Extension is.SVC (Service Contract)