より複雑なシナリオでより簡単に作業できるように、WCF構成ファイルをより適切に取得しようとしています。いつものように、私は基本の理解を再考しています。したがって、これにより、バインディング構成と動作の違いは何ですか?という質問が発生します。バインディングとは何か(つまり、など)については質問していません。netTcpBinding
わかりました。
したがって、その単一のバインディングに対して複数の構成を持つ構成ファイルがあるとしましょう。
<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">
<!-- 15MB max size -->
<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">
<!-- 0.5MB max size -->
<readerQuotas maxDepth="256" maxStringContentLength="524288" maxArrayLength="524288" maxBytesPerRead="204800" maxNameTableCharCount="524288" />
<security mode="None"></security>
</binding>
</netTcpBinding>
このシナリオでは、、、および「バインディング構成」を呼び出してLargeMessages
いLargeFiles
ますLargeStrings
。
その構成ができたので、複数のビヘイビアーを設定することもできます。次のようになります。
<behavior name="DefaultServiceBehavior">
<serviceCredentials>
<serviceCertificate findValue="1234123412341234123412341234"
x509FindType="FindByThumbprint" />
</serviceCredentials>
<serviceMetadata/>
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
この場合、DefaultServiceBehavior
は動作です。
したがって、私の質問をする別の方法は、なぜ私のバインディング構成に私の動作が指定するすべての設定を含めることができないのですか?またはその逆?基本レベルと高レベルで、なぜ両方の設定セットがあるのですか?どちらも、トランスポート構成またはメッセージ構成に非常に大きな影響を与える可能性があるようです。設定を分離するためのロジックがわかりません。