如何配置自定义绑定和MTOM编码?我有一个自定义绑定,如下所示,
<customBinding>
<binding name="stsBinding">
<security authenticationMode="UserNameOverTransport"
requireDerivedKeys="false"
keyEntropyMode="ServerEntropy"
requireSecurityContextCancellation="false"
requireSignatureConfirmation="false">
</security>
<httpsTransport />
</binding>
</customBinding>
我的MTOM绑定如下,
<basicHttpBinding>
<binding name="HttpStreaming"
maxReceivedMessageSize="2147483647"
messageEncoding="Mtom"
transferMode="Streamed"/>
</basicHttpBinding>
我如何结合这个?
答案 0 :(得分:8)
您必须添加消息编码元素:
<customBinding>
<binding name="stsBinding">
<security authenticationMode="UserNameOverTransport"
requireDerivedKeys="false"
keyEntropyMode="ServerEntropy"
requireSecurityContextCancellation="false"
requireSignatureConfirmation="false">
</security>
<mtomMessageEncoding />
<httpsTransport />
</binding>
</customBinding>
答案 1 :(得分:0)
此在线tool可以帮助将普通绑定转换为自定义绑定。
从绑定中删除任何限制,例如maxBufferSize
,因为该工具不支持其中的许多限制。您可以在之后添加它。