1) Web Services support hosting in IIS whereas WCF support hosting in IIS, WAS and Self-hosting.
2) Web Services can be invoked by Http whereas WCF service can be invoked by Http, Tcp, Named Pipes, MSMQ.
3) WCF Services are more reliable and secure as compare to Web Services.
4) WCF Services are more flexible as we make a new version of service we just have to expose a new endpoint.
5) In Web Service, [WebMethod] attribute specifies the method exposed to client. In WCF [OperationContract] attribute represents the method.
Asked In: Many Interviews |