2010-09-03 63 views
5

如何配置自定義綁定和MTOM編碼?我有一個像下面給出一個自定義綁定,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> 

如何合併呢?

回答

6

您必須添加消息編碼元素:

<customBinding> 
    <binding name="stsBinding"> 
     <security authenticationMode="UserNameOverTransport" 
       requireDerivedKeys="false" 
       keyEntropyMode="ServerEntropy" 
       requireSecurityContextCancellation="false" 
       requireSignatureConfirmation="false"> 
     </security> 
     <mtomMessageEncoding /> 
     <httpsTransport /> 
    </binding> 
    </customBinding>