Why WCF Web Service

I am writing this article to understand the basic need of WCF web service. This will explain you why we need WCF web service not the what is WCF web service. You will get n numbers of article over the internet which are explaining what is WCF web service. I am seeing many new freshers in .NET technology who want to learn this technology only because it is hot in the market but not aware that why exactly we need WCF web service.

Let’s come to the point now. First I will tell you the drawback of simple web services.

Suppose I have two clients. One’s requirement is that, he wants to use web service which is implementing HTTP protocol to transfer the information over the network and want the replied output in the form of XML format. To fulfill his requirement I simply develop the web service (which having extension .asmx). This will provide the complete solution to the user.



While my second client wants to use web service which is implementing TCP protocol to transfer the information over the network and want the replied output in the form of binary format. To fulfill his requirement I simply develop the .net remoting web service. This will provide the complete solution to the user.



Here the scenario is that to accomplish these two requirement of user developer need to develop two different types of web services. Developer need to learn two technology.

Here’s the WCF web service comes into picture. Both above requirements is fulfilled by single WCF web service. We don’t need to develop two different web services. We can specify the protocols names in endpoint attribute of the WCF web service (again what is the endpoint is I need to write new article) but just understand the high level requirement. By writing only one WCF web service and specifying the which protocol we want to use while calling the web service is easy as compare to writing two different web services.

That is why Microsoft introduces WCF web service in .NET framework 3.0.

I hope this, by this scenario , you will come to know that why exactly we need WCF web service.

Please post a comment if still you have confusion about this article or like.

Next Recommended Reading WCF And WCF Service Components