1
由于WPF 4提供了默认配置,所以我很难尝试为我的服务创建自定义MTOM绑定。简而言之,我的WCF库承载了几个使用基本HTTP的服务。其中一项服务用于文件上传,并要求使用MTOM。我该怎么做才能让我的文件上传服务使用自定义的MTOM绑定,其余的使用默认的?WCF 4中的自定义MTOM绑定
这是我到目前为止有:提前
<bindings>
<basicHttpBinding>
<binding
name="FileTransferBinding"
transferMode="Streamed"
messageEncoding="Mtom"
maxBufferSize="65536"
maxReceivedMessageSize="10485760">
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="FileTransferService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="FileTransferBinding" contract="MyServices.IFileTransfer"/>
</service>
</services>
谢谢!
感谢Pop Catalin!这很有效,我现在在客户端看到了Mtom,但由于某种原因客户说transferMode =“Buffered”而不是“Streamed”。对此有任何想法? – dandax 2011-02-07 14:45:53