WCF vs WebService

This post quickly explains difference between WCF & WebServices.

1. Protocols:

  • Web service supports HTTP via SOAP.
  • WCF supports HTTP, TCP,MSMQ, UDP , Named Pipe and many custom formats  SOAP, JSON, REST etc

2. Security:

  • Web Service provides only transport level security.
  • WCF supports Transport Level , Message Level & Data Level Security.

3. Hosting:

  • Web Service can be hosted in IIS only
  • WCF  can be hosted on IIS, WAS- (Windows Activation Server) , Managed Windows Service. Also it can be self hosted ( windows form , console app )

4. Migration:

  • Any .net distributed applciation can be easily migrated to WCF with very fewer changes.
  • Not easily possible in Web Service.

5. Serialization:

  • In order to serialize a web service we need to explicitly specify serialization attributes using  XML Serialization
  • WCF incorporates  Serialization by default for exposed methods using WCFSerialization.

One comment on “WCF vs WebService

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s