Thomas
Thomas

Reputation: 34208

what is the main differences between web service and wcf?

i know that web service can be host only in IIS but wcf can be host in IIS and both in win service too. but where is the actual main power lies in wcf for which developer choose wcf rather web service. please explain in detail. thanks

Upvotes: 3

Views: 1623

Answers (3)

dexter
dexter

Reputation: 7213

Basically WCF is a lot more poweful way of building distributed apps. As opposed to the asmx which was really only SOAP over http, WCF provides with many other communication providers (such as TCP/IP). WCF lets you configure its behaviours via configuration (how to process data - async vs sync, only one instance of the wcf service for any client request and etc). So wcf, in the nutshell is the successession of the remoting classes of .net 2.0 plus the asmx together. With that being said, you can host your WCF outside the IIS in your own process - Win Service, Win Form or whatever exe. You just need to implement the service host.

Upvotes: 0

Henk Holterman
Henk Holterman

Reputation: 273621

WCF offers:

  • unified programming model
  • new features
  • more protocols
  • support for the older ASMX/XML webservices

In .NET, use WCF unless you have very specific legacy requirements.

Upvotes: 2

Drazar
Drazar

Reputation: 110

Windows Communication Foundation (WCF) has an ASP.NET compatibility mode option to enable WCF applications to be programmed and configured like ASP.NET Web services, and mimic their behavior.

Better performance, web-services uses XmlSerializer and WCF uses DataContractSerializer which is better in Performance as Compared to XmlSerializer.

In other words you can host plain old web-services using WCF. And you have more possibilities like using communication over Named Pipes/TCP/MSMQ etc.

Upvotes: 2

Related Questions