Can WCF sevice and client share the same settings (from the same config file) about bindings, etc.., whatever is in? In other words, can I write a single bindings section and put in anything and be sure that it is good for service and client?
I'll explain better. I have a config file like this:
<services>
<service name="TestClass1">
<endpoint binding="basicHttpBinding" address="http://dev00:4322/host1/TestApplication1" contract="myApp.Interface.ITestApplication"/>
<endpoint binding="netTcpBinding" bindingConfiguration="Binding1" address="net.tcp://dev00:4321/host1/TestApplication1" contract="myApp.Interface.ITestApplication"/>
<endpoint binding="netNamedPipeBinding" address="net.pipe://localhost/host1/TestApplication1" contract="myApp.Interface.ITestApplication"/>
</service>
<service name="ManagementClass1">
<endpoint binding="netNamedPipeBinding" address="net.pipe://localhost/host1/ManagementApplication1" contract="myApp.Interface.IManagementApplication"/>
<endpoint binding="netTcpBinding" bindingConfiguration="Binding1" address="net.tcp://dev00:4321/host1/ManagementApplication1" contract="myApp.Interface.IManagementApplication"/>
</service>
</services>
<client>
<endpoint name="clientTestClass1Tcp"
address="net.tcp://dev00:4321/host1/TestApplication1"
binding="netTcpBinding"
bindingConfiguration="Binding1"
contract="myApp.Interface.ITestApplication"/>
<endpoint name="clientManagementClass1Tcp"
address="net.tcp://dev00:4321/host1/ManagementApplication1"
binding="netTcpBinding"
bindingConfiguration="Binding1"
contract="myApp.Interface.IManagementApplication"/>
</client>
<bindings>
<netTcpBinding>
<binding name="Binding1"
closeTimeout="00:00:10"
openTimeout="00:00:10"
receiveTimeout="00:01:00"
sendTimeout="00:01:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
listenBacklog="10"
maxBufferPoolSize="524288"
maxBufferSize="65536"
maxConnections="30"
maxReceivedMessageSize="65536">
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</netTcpBinding>
</bindings>
where not all is under my control. Can I be sure that sharing the bindings (and other sections..) between service and client, whatever gets written, all goes well both in service and in client?