Hosting in Windows Services

Hosting a WCF service in a Windows service is a logical choice. Windows services shouldn't be confused with WCF services. They both use the word service, but they have different meanings. A Windows service is a process managed by the operating system. Windows comes with the Service Control Manager, which controls the services installed on the operating system. Windows uses services to support operating system features such as networking, USB, remote access, message queuing, and so on. You can use Visual Studio 2005 to create a Windows service using the Windows Service project template shown in Figure 5-2.

The Windows Service project template generates a project that contains two files: the service1.cs that contains ...

Get Pro WCF: Practical Microsoft SOA Implementation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.