I am trying to get WCF configuration files better, so I can more easily work on more complex scripts. As usual, I am revising my understanding of the basics. So the question is: What is the difference between binding configuration and behavior? I am not asking what binding is (i.e. netTcpBinding , etc.). I understand.
So, let's say I have a configuration file with several configurations for this single binding:
<netTcpBinding> <binding name="LargeMessages" maxBufferPoolSize="5242880" maxBufferSize="5242880" maxReceivedMessageSize="5242880"> <readerQuotas maxDepth="256" maxStringContentLength="16384" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"></security> </binding> <binding name="LargeFiles" maxBufferPoolSize="15728640" maxBufferSize="15728640" maxReceivedMessageSize="15728640"> <readerQuotas maxDepth="256" maxStringContentLength="15728640" maxArrayLength="15728640" maxBytesPerRead="204800" maxNameTableCharCount="15728640" /> <security mode="None"></security> </binding> <binding name="LargeStrings" maxBufferPoolSize="524288" maxBufferSize="524288" maxReceivedMessageSize="524288"> <readerQuotas maxDepth="256" maxStringContentLength="524288" maxArrayLength="524288" maxBytesPerRead="204800" maxNameTableCharCount="524288" /> <security mode="None"></security> </binding> </netTcpBinding>
In this case, I call LargeMessages , LargeFiles and LargeStrings โLink Configurationsโ.
Now that I have this config, I can also have several Behaviors where one could look like this:
<behavior name="DefaultServiceBehavior"> <serviceCredentials> <serviceCertificate findValue="1234123412341234123412341234" x509FindType="FindByThumbprint" /> </serviceCredentials> <serviceMetadata/> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior>
In this case, DefaultServiceBehavior is the behavior.
So another way to ask your question is: Why can't my snap setting contain all my settings set by my Behavior? Or vice versa? At a basic and high level, why do we have both sets of settings? It seems that both can very significantly affect my transport configuration or my message configuration. I just do not see the logic of separation of settings.
source share