asp.net - How to configure WCF in a separate dll project -


I am developing a web application (ASP.Net 3.5) which will consume many web services. I have created a separate DLL project for each web service: These projects include service reference and client code.

However, in the calling website & lt; System.serviceModel & gt; is in web.config in the information ( & lt; bindings & gt; and & lt; client & gt; nodes), even if this information is in the DLL App Also in the config file! I tried copying serviceclass.dll.config to the website's bin directory, but it does not help.

Is there a way to centralize the configuration of a WCF client?

I have limited WCF experience only, with all BasicHTTP bindings. But I am allergic to the WCF's XML files and thus managed to stay away from them. I usually do not recommend it but I put the configuration details in my application in the current configuration store and then apply them to the programmers. As with the web service proxy I use the constructor for the 'client' which takes 'binding' and 'endpoint' and settings are applied in the programming binding; End Point

A more efficient solution seems ruined here: but I have not done it yet.


Comments