Reputation: 3241
My solution is composed of several Class Library projects. One of these include a Service Reference. The functionality exposed by this particular assembly will need be called from several other assemblies.
How can I manage the configuration file(s) for this solution, so that I don't have to repeat the <system.serviceModel>
contents on every single assembly making use of the web service?
Upvotes: 1
Views: 455
Reputation: 754488
That approach (repeating in every app's config) is the default and recommended way to go - you cannot easily have config files for class-library assemblies (you can, but it's a fair bit of work to get them to actually work - not worth the trouble).
If you can't live with this, you could definitely create your WCF client proxy in code, bindings, options, endpoints and all. You do gain a bit of ease-of-use (no more config needing to be put into every app calling the class library), but you loose a bit of flexibitlity (endpoint addresses and binding options are now hard-coded).
Upvotes: 1