Can I split system.serviceModel into a separate .config file?
Posted
by Mr Bell
on Stack Overflow
See other posts from Stack Overflow
or by Mr Bell
Published on 2010-05-11T19:51:41Z
Indexed on
2010/05/11
19:54 UTC
Read the original article
Hit count: 331
asp.net-3.5
|wcf
I want to separate my system.serviceModel section of the web.config into a separate file to facilitate some environment settings. My efforts have been fruitless. When I attempt it using this method. The wcf code throws an exception: "The type initializer for 'System.ServiceModel.ClientBase 1
threw an exception. Can anyone tell me what I am doing wrong?
Web.config:
<configuration>
<system.serviceModel configSource="MyWCF.config" />
....
MyWCF.config:
<system.serviceModel>
<extensions>
...
</extensions>
<bindings>
...
</bindings>
<behaviors>
...
</behaviors>
<client>
...
</client>
</system.serviceModel>
© Stack Overflow or respective owner