The service that I described on Friday can be hosted in a variety of ways. The first way is by using something called Windows Activation Service. I have no idea what this is but supposedly it functions similar to IIS but can be used for Indigo services. If anyone wants to figure out what that is and where it comes from, please let me know.
The second way is that it can be hosted using a console application or more likely a windows service. To do this a generic instance of the ServiceHost class is used. You simply pass the class name of your Indigo service as the generic parameter of the ServiceHost class. Once you have instantiated the class, you simply call the Open method to start accepting connections.
public class MyClassHost
public static void Main()
// instantiate the indigo service using a generic
ServiceHost<MyClass> myClass =
// open the indigo service so that it will accept connections
The last thing that is necessary to host an Indigo service is to define a binding in a configuration file. A binding simply specifies how the service can be accessed (i.e.: SOAP/HTTP, SOAP/TCP, etc.) The complete list of bindings is available in the article.
A typical configuration file would look like this:
In this case the binding type is BasicProfileHttpBinding which is effectively SOAP over HTTPS. Tomorrow, I will talk about creating an Indigo client.
Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=172