Web Service Vs WCF (Window Communication Foundation)
WCF is a set of .NET Framework-based technologies for building and running services. WCF is the next step in the evolutionary path that started with COM, COM+, and MSMQ, and continues through .NET Remoting, ASMX, System.Messaging, and .NET Enterprise Services. WCF combines these technologies and offers a unified programming model for developing services using any CLR-compliant language.
ASP.NET Web Service
Slower compared to WCF
The main benifit of the design of the DataContractSerializer is better performance over XML serialization
File extention is asmx
File extension is .svc
To and from Data Transition is done through XML Serializer
DataContractSerializer is used for data transition
Webmethods vs DataContract Attributes
ASP.NET WebService uses Webmethods to to translate .NET FW types in to XML.
The WCF uses the DataContractAttribute and DataMemeberAttribute to translate .NET FW types in to XML.
Public/Private fields or properties of .NET types can be translated
IDictionary Interface class
Classes that implement the IDictionary interface, such as Hash table can not be serialized.
The DataContractSerializer can translate the Hash Table into XML. Hence using WCF we can even translate HashTable into XML
Know which fields /properties
XMLSerialization does not indicate the which fields or properties of the type are serialized into XML
DataCotratSerializer Explicitly shows the which fields or properties are serialized into XML
In ASP.NET Web services, Unhandled exceptions are returned to the client as SOAP faults.
In WCF Services, unhandled exceptions are not returned to clients as SOAP faults. A configuration setting is provided to have the unhandled exceptions returned to clients for the purpose of debugging.