none
Can not use the Mtom encoding for basicHttpBinding RRS feed

  • Question

  • Hi there

    I cannot switch to using Mtom for basicHttpBinding binding (client is Silverlight 5). I have current server-side configuration as

    <bindings>
          <basicHttpBinding>
             <binding closeTimeout="00:05:00" openTimeout="00:05:00"
                    receiveTimeout="00:05:00" sendTimeout="00:05:00"
                    hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647"
                    maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
                    transferMode="Buffered">
              <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647".../>
              <security mode="Transport">
                <transport clientCredentialType="None"/>
              </security>
            </binding>
    ...

    As soon as I add the messageEncoding="Mtom" right after the transferMode="Buffered", recompile it and update my client reference, I get the following error message:

    The content type multipart/related; type="application/xop+xml";start="<<a href="http://tempuri.org/0>";boundary="uuid:3011e876-fd0f-49ed-9f7c-6203d9741919+id=7";start-info="text/xml">http://tempuri.org/0>";boundary="uuid:3011e876-fd0f-49ed-9f7c-6203d9741919+id=7";start-info="text/xml" of the response message does not match the content type of the binding (text/xml; charset=utf-8)...

    What to give or take to my service configuration?

    Thanks.

    Wednesday, March 27, 2013 8:44 PM

Answers

  • Hi,

    It should work, you may try delete the service reference and re-add the service reference for the Silverlight application and please check it has set messageEncoding="Mtom" and transferMode="Buffered" for the binding of the client.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 29, 2013 10:05 AM
    Moderator