Main difference
between WCF & Web services:
Features
|
Web service
|
WCF
|
Hosting
|
It
can be hosted in IIS.
|
It
can be hosted in IIS, WAS (Windows Activation Service), Windows Service, Self
Hosting.
|
Programming
|
[Webservice]
attribute has to be added to the class.
|
[ServiceContract]
attribute has to be added to the class.
|
Model
|
[WebMethod]
attribute represents the method exposed to the client.
|
[OperationContract]
attribute represents the method exposed to the client.
|
XML
|
System.XML.Serialization
namespace is used for serialization.
|
System.Runtime.Serialization
namespace is used for serialization.
|
Encoding
|
XML
1.0, MTOM (Message Transmission Optimization Mechanism), DIME, Custom.
|
XML
1.0, MTOM, Binary, Custom
|
Transports
|
Can
be accessed through Http, TCP, and Custom.
|
Can
be accessed through Http, TCP, Named Pipes, MSMQ, P2P, and Custom.
|
Protocols
|
Security
|
Security,
Reliable Messaging & Transactions.
|
|