Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a WCF Service Application and a WCF Service Library?

People also ask

What is WCF Service library?

The WCF service library project alleviates this limitation by providing an App. config file for the library during development. However, the App. config file is not recognized after deployment. You have to move your configuration code into the configuration file recognized by your hosting environment.

What is WCF Service application?

Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application.

What is the difference between WCF and Web services?

Web services support only one protocol- HTTP and HTTPS during communication, but WCF supports more protocols like- HTTP, TCP, and MSMQ that can be extended for a comprehensive solution, reliable session, and transactions. It signifies WCF is more adaptable to work together for a variety of software.

What is WCF service in VB net?

What is WCF? Windows Communication Foundation (WCF) is a framework for building service oriented application. In this example, we are going to create a simple application which is used for adding two numbers where parameters are passed on URL as query string and return values in XML format.


A service application includes a website host already setup for you. A service library is a library of services that a host can reference and startup.

If you start with a service library (recommended) you can then choose any host you wish (a windows service, IIS/ASP.NET, or even a console application) and you'd just reference your library from your new host. Choosing a Service Application limits your host to just IIS/ASP.NET (though this might be ok for your purposes, but will limit the protocols you can use).

Edit: Changes in IIS since I wrote this allow for a wider variety of protocols on ASP.NET activated services, so choosing a service application is much less limiting than before.


If all you have is the one project I see only added complexity if you separate for the heck of it. I used a library when I had some particular use cases where I had to host in both a windows service and in IIS.

For IIS you you can move the classes and interfaces to a library but keep your .SVC files in the web project. You must edit the .SVC files to point to the properly qualified classes.