Reputation: 34208
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
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
Reputation: 273621
WCF offers:
In .NET, use WCF unless you have very specific legacy requirements.
Upvotes: 2
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