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

Difference between WCF and Web Service


WCF WCF 
Ratings:
1 Comment(s)
 2668  View(s)
Rate this:

What are the differences between WCF and Web Service

 

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.

Web Service and WCF

By John Smith on   5 years ago
Thanks Uttam!
Really useful points

Don't want to miss updates? Please click the below button!

Follow MindStick