I call an Azure (WCF) web service from a Silverlight application. Silverlight only supports basicHttpBinding so my ServiceReferences.ClientConfig file looks like this:
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IServices" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://(AzureUri)/Services.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IServices"
contract="WebServices.IServices" name="BasicHttpBinding_IServices" />
</client>
</system.serviceModel>
</configuration>
The problem is that the Silverlight application crashes with the infamous “NotFound” error message when making a call to the Azure web service with more than 16384 bytes of data, obviously hitting one of the limitations.
But basicHttpBinding does not support attributes like maxBytesPerRead, maxStringContentLength, so I don’t know how I can allow calls to the Azure web service with more than 16 KB of data.
Googling has just confused me more, so any help is appreciated…
Thanks for your time,
Paul
On the server configuration, make sure the bindingConfiguration attribute of the endpoint element inside the service element correctly points to the name of the binding. Also verify that the binding element points to “basicHttpBinding”. In general, carefully review all the names, because if one of them is mispelled or missing, you’ll end up with the default configurations in the server.
For a complete example see Retrieving huge amount of data from WCF service in Silverlight application.