This article demonstrates the required steps to host your WCF service in Windows Service and consume it in a console application.
Hosting WCF service to Windows service gives you the following benefits.
- Service will be automatically started whenever the hosting computer starts. Service can be manually started, stop, or restart.
- Service will always be activated and available for clients. No need for runtime activation.
- Windows Administrators already know managing Windows services.
- Provides an extra layer of security through windows identity.
- Gives better performance than service hosted in IIS.
- Gives you the flexibility to choose any bindings.
-
WCF Service - WCF Service with IProduct Service Contract exposed.
-
Windows Service hosting WCF Service - Windows service hosting Product WCF Service.
For more detailed description visit - https://geeksarray.com/blog/example-for-hosting-wcf-service-in-windows-service