You can share parts of the WCF config by "outsourcing" it:
<system.serviceModel>
<client configSource="client.config" />
.....
</system.serviceModel>
and then have this content in your client.config
:
<?xml version="1.0" encoding="utf-8"?>
<client>
<endpoint name="ABC"
address="http://......."
binding="......."
contract="......" />
</client>
You cannot put stuff into the app.config
of a common assembly, since those config files will not be used / looked at by the .NET framework. You need to put your info into the main config file of the app or web site (web.config
) - but you can "externalize" certain sections into separate, external files and sharing them like that.