Geeks With Blogs
Marcin Celej blog November 2007 Entries
Checking if WCF service is configured in your app.config
When you need to startup WCF service conditionally - depending on your application configuration it is quite easy to achieve it by checking the ServiceHost.BaseAddresses collection. If your app.config file does not contain your service configured the collection will be empty. Here is the snippet: ServiceHost host = new ServiceHost(typeof(MyServic... if (host.BaseAddresses.Count < 1) return; host.Open(); Next time I will post how to plug-in service startup in your application startup with a plug-in ......

Posted On Wednesday, November 7, 2007 7:18 AM

Copyright © Marcin Celej | Powered by: