Hello there,
I have two Services called TemplateService, TemplateReportService (both defined in one WCF Service Library) to be exposed to the client application.
Is it possible to host these two services under one Windows Service?
Thank you!
Hello there,
I have two Services called TemplateService, TemplateReportService (both defined in one WCF Service Library) to be exposed to the client application.
Is it possible to host these two services under one Windows Service?
Thank you!
Yes, it is possible. Create two ServiceHost with different endpoints and open both of them when starting the windows service. You can even use the same port (if using net.tcp bindings) by enabling port sharing.
I personally hosted more than 80 services in one process by scanning a specific directory for assemblies with services inside (reflection). This was running on a quite powerful machine (8 cores, 16GB) with thousands of users. Shortly after finishing this I found this link: http://blogs.microsoft.co.il/blogs/alon/archive/2008/03/12/hosting-plug-in-wcf-services.aspx which is basicly doing the same but with a better separation between service hosts by using application domains. On a second try I would use this host.