This project is read-only.

WCF Web API for interacting with windows services?

Topics: Web Api
Jun 18, 2011 at 8:36 PM

I have a suite of windows services which power the back end of my company's product. Each windows service runs from the time the server starts to the time it shuts down and is interacted with via a WCF service using a TCP endpoint.

It would be extremely handy to be able to be able to expose some of this functionality via a REST API, which I believe is what the WCF Web API excels at. What's the best way to go about providing REST access to a WCF service hosted inside a non-IIS process?

Jun 18, 2011 at 8:47 PM

The should be doable. We include HttpServiceHost and HttpConfigurableSerivceHost (if you want the fluent api) in the box. Using these hosts you can self-host services outside of IIS such as within a windows service.


Jun 19, 2011 at 1:43 AM


There is a very simple example of a self-hosted service here in Web Api Contrib.  This example is in a console app, but it will run just fine in a Windows service.