0
votes

I created a WCF service and hosted that with in a Windows service it is called self hosting. It is clear to me but my question is.

If we are using self hosting in console application/WPF application then do we need to provide WCF code to each installation instance of application. Or will the WCF service be located centrally?

1
I did not understand what do you mean by " installation instance of application'?Ricardo Pontual
Suppose if we have to install application at 100 client machine. Installation instance is 100 here. Installation instance means per install.Rudra
As you said it's a WCF service, what's the purpose of installing in so many machines? A service is centralized, you can install clients, if they are applications, but not the service, it can be just one application running.Ricardo Pontual
We have one solution which include, WPF application , a class library for WCF service , and a console application which host our service. Now i can consume service in WPF application. Here i want to know, Will installer include all the project or We create one installer which have WPF Client application and install our console application service host at centralize location?Rudra

1 Answers

1
votes

It is absolutely up to you - only application author can make this decision. If you are creating some kind of client/server application then in most cases you will need to install your client (WPF) application separately from your server (Console + WCF) part.

There are cases, though, when requirements tell you to install them together - again, only you know.

But there is another aspect - hosting WCF service in console host might not be good idea for production code. How are you going to run it? If it is each time when user logins, then what's the purpose of such a service - you can as well keep same code inside WPF application.

If it has to be Windows service, then console app will work, but again you need to think carefully what is the usage scenarios of your product - does it require central server or not.