I have a C# Windows Service and an ASP.NET 4.0 web application that are, at the moment, independent of each other and hosted in the same network.
The Windows Service reads from a database, and generates a text file each time it is invoked.
My intention is to
a) Call the Windows Service from the ASP.NET application.
After reading a bit, it seems this can be easily done using the Service Controller class.
b) To display live progress of the Windows Service at the client side (browser)
My initial thoughts were to have some kind of global variables inside the Service, that can then be accessed by the remote asp.net app, but I’d like to know what is the best way to do this.
Here’s an MSDN article on hosting a WCF service within a Windows Service:
How to: Host WCF in a Windows Service Using TCP
http://msdn.microsoft.com/en-us/library/cc949080.aspx