I have .NET project in which I have APP.Client.Proxy class library project, responsible to implement WCF for client side so all the services and end-point configuration details are there and then I have another ASP.NET MVC project using these services implementation i.e. from controller. Now if I put services and end-point detail in app.config for class library project then it do not work, complaining about cannot find end-point but do work if I put end-point configuration detail in web.config for MVC web application.
My question is there way that I keep the services and end-point detail separate in app.config in class library rather then web.config
The app domain uses one config file when executing. while app setting and connection strings sections allow for referencing external file and configSource respectively.
After some quick GoogleFu I cam across these two articles
http://weblogs.asp.net/cibrax/configsource-attribute-on-system-servicemodel-section
The crux of it is that you cannot leave it in the class library config but you can still separate them out into external config files.
<configuration>
<!-- other code removed for brevity -->
<system.serviceModel>
<services configSource="Services.config" >
</services>
<bindings configSource="Bindings.config">
</bindings>
<behaviors configSource="Behaviors.config">
</behaviors>
</system.serviceModel>
<!-- other code removed for brevity -->
</configuration>