简体   繁体   中英

How to use multiple locations for configSource in config file for WCF Client

Our application will act as client for different WCF-services in the future. At the moment we consume only one WCF-Service. Our config-file for the application is set up using configSource-attribues at the moment:

<configuration>
  <system.serviceModel>
    <services configSource="services.config"/>
    <bindings configSource="bindings.config"/>
    <behaviors configSource="behaviors.config"/>
    <extensions configSource="extensions.config"/>
  </system.serviceModel>
</configuration>

Is there a way to use multiple files for eg the bindings section? We would like to have each binding for a particular WCF-service that we consume in one file. So we would need to point the bindings section to multiple configSources.

Any help would be great.

Looks like you can't separate the configsections into different physical files. So we ended up merging eg all bindings in one file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM