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
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.
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.
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 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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With