Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diff between WCF service library and WCF service application

I want to use WCF service (.svc) in my WPF project., Iam trying to create a service., but in Visual studio we have "WCF service library" and "WCF service application". I tried both.

When we create "WCF Service application" we will get .svc file., that when we host we will get .svc file as a service referece.

But What about the "WCF service Library" project? When i create this i got only .cs files and i tried to added new .svc files, but we doesnt have the option to add .svc files. Please guide me how to use the services created by "WCF service library" project in My WPF application

like image 891
Anusha.G Avatar asked Feb 18 '13 19:02

Anusha.G


People also ask

What is the difference between WCF Service library and WCF Service application?

The major difference is that the WCF Service Application has a . svc file, whereas the WCF Service Library does not have a . svc file. Suppose we want to host this service application in IIS, then you need to specify for IIS the execution runtime environment requirements.

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.

What is difference between Windows service and WCF service?

A windows service is what you need. WCF is a communications library, and unless you plan to communicate with your application via a client, you don't need it. Your problem is related to activation, and keeping your code active in the background is what windows services do.


1 Answers

Services created in WCF service library can be hosted using multiple paradigms. The following link (pretty old) explains various ways of histing a wcf service.

http://msdn.microsoft.com/en-us/library/bb332338.aspx

please note that you need .svc file if you are hosting your wcf service in IIS. you can write your own host and will not require .svc file

like image 73
Dhawalk Avatar answered Sep 18 '22 13:09

Dhawalk