Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you configure a WCF client in production?

There are numerous resources available on WCF and configuration (both programmatic and via app.config). However, I have not seen a good resource on practical management of this configuration, particularly in a production environment.

WCF is powerful in that the framework allows configuration via the app.config file so that you can tweak various settings without having to recompile code.

When installing a WCF client, how do you easily configure the client to point to the right server? This is probably the most common thing I can think of to configure after installing. For some context, suppose I ship a product which has a server component and a client component. Customers can install both wherever. While an xml file is powerful for post-development configuration, it is not user-friendly at all. Given that there can be several dozen endpoints in a config file, does the admin or end user have to manually change all of them? I know I could do everything programmatically, but then I essentially am re-implementing all of the out-of-the-box plumbing.

Above question, more generalized is: how can I simplify WCF configuration via some basic UI without re-implementing what is provided by the framework?

like image 581
Travis Avatar asked Oct 11 '22 00:10

Travis


1 Answers

If you want user friendly installation you will use some installer where you simply set some configuration values. Check either installer project provided as part of Visual studio or more powerful (and much more complex) WiX. If you don't have installer you already chose that users are supposed to configure everything manually.

If your only problem is address of services and you plan to deploy services and clients to single LAN you can also add WS-Discovery (available in WCF 4) where clients are able to find service on the network.

like image 135
Ladislav Mrnka Avatar answered Oct 18 '22 09:10

Ladislav Mrnka