views:

128

answers:

1

Hello,

I have a WCF service that is returning a lot of data. I want to compress that information so I thought that using BinaryEncoding would be appropriate.

Currently, I have a binding setup in my web.config as follows:

<binding name="myCustomBinding" closeTimeout="00:05:00" openTimeout="00:05:00"
  receiveTimeout="00:05:00" sendTimeout="00:05:00">
  <binaryMessageEncoding />
  <httpTransport maxReceivedMessageSize="8388608" maxBufferSize="8388608">
    <extendedProtectionPolicy policyEnforcement="Never" />
  </httpTransport>
</binding>

In my ServiceReferences.clientconfig file, I have the following binding settings:

<binding name="CustomBinding_MyService">
  <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
    <extendedProtectionPolicy policyEnforcement="Never" />
  </httpTransport>
</binding>

Oddly, this configuration will not work. As soon as I remove the <binaryMessageEncoding /> line from the web.config, everything works fine.

My question is, how do I use binary message encoding? Is there something I need to configure in my ServiceReferences.clientconfig?

Thank you

+1  A: 

Can you define "will not work"?

Note that the client and server must agree; Silverlight has only a limited subset of extension points, but it seems that <binaryMessageEncoding/> is supported (source and more info) - so perhaps add it to the client?

Marc Gravell