blog

Home / DeveloperSection / Blogs / Difference between WCF and Web Service

Difference between WCF and Web Service

Uttam Misra4834 29-Oct-2010

Attributes

WCF has [ServiceContract] attribute attached with the class.
WS has
[WebService] attribute attached with the class.
WCF has
[OperationContract] attribute attached with methods.
WS has
[WebMethod] attribute attached with methods.

Hosting
WCF can be hosted on IIS, WAS, of self-hosting.
WS can be hosted on IIS.

XML
WCF uses using System.Runtime.Serialization; namespace for serialization.
WS uses
using System.Xml.Serialization; namespace for serialization.

Transports
WCF support HTTP, TCP, MSMQ, P2P transport protocols.
WS support Http protocol.

Encoding
WCF supports XML, MTOM (Messaging Transmission Optimization Mechanism), Binary.
WS supports XML, MTOM, DIME (Direct Internet Message Encapsulation).

Security
WCF provides reliable security for messaging and transactions over net.
WS doesn’t provide method level security & message delivery isn’t assured & can be lost without acknowledgement.

Updated 18-Sep-2014
More than 18 years of working experience in IT sector. We are here to serve you best.

Leave Comment

Comments

Liked By