Silverlight : The remote server returned an error: NotFound [Solution]
Tuesday, August 5, 2014 Category : Silverlight, WCF 0
System.Net.WebException: The remote server returned an error: NotFound
There are two places you have to edit:
1. edit the ServiceReferences.ClientConfig to accept a large buffer.
<binding name="BasicHttpBinding_MosaicService" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
maxReceivedMessageSize="2147483647">
2. on the server in the web.config
<system.serviceModel>
add a Httpbinding and name it
<bindings>
<basicHttpBinding>
<binding name="ServicesBinding" maxReceivedMessageSize="2000000" maxBufferSize="2000000">
<readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000"/>
</binding>
<basicHttpBinding>
<binding name="ServicesBinding" maxReceivedMessageSize="2000000" maxBufferSize="2000000">
<readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000"/>
</binding>
which setts it to 2MB and tell the service to use this binding
<system.serviceModel>
<services>
<service behaviorConfiguration="TekPlayground.MosaicServiceBehavior"
name="TekPlayground.MosaicService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="ServicesBinding" contract="TekPlayground.MosaicService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
name="TekPlayground.MosaicService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="ServicesBinding" contract="TekPlayground.MosaicService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>