Friday, 4 November 2011

WCF vs webservices

A. Difference between Webservices and WCF

1)WCF comes with .Net frame work 3.0/3.5. To use in 2.0 frame work we need to install MS add in component.

2)Web service can be hosted on IIS only where as WCF can be hosted on IIS, Self hosting, Windows service and Windows activation service. Since WCF can be hosted in different applications it is flexible.

3)WebService and WebMethod are used in web services where as in WCF - Service contracts, Operation contacts, Message contacts, Data contacts and Fault contacts are used in the service.

4)WebService can be accessed over HTTP, TCP, Custom where as WCF can be accessed over HTTP, TCP, Named pipes, MSMQ , Custom and P2P.

5)In Webservice unhandled exceptions are returned to clients where as in WCF a configuration settins is provided for these faults.

6)Webservice use System.Xml.serialization to translate data where as WCF uses System.Runtime.Serialization name-space.

No comments:

Post a Comment