Когда я передаю список объектов из своего приложения silverlight с использованием WCF, все работает нормально, пока список не станет слишком большим. Кажется, что, когда я превысил 80 элементов, я получаю сообщение об ошибке: Удаленный сервер возвратил неожиданный ответ: (404) Не найденоSilverlight & WCF: максимальный размер сообщения
Я предполагаю, что это связано с тем, что список стал слишком большим, как когда в списке было 70 предметы все отлично работают. Странное сообщение об ошибке, верно?
В конфигурационном файле я изменяю maxBufferSize на самое высокое значение, которое оно примет, но все же у меня не может быть более 80 элементов в моем списке.
Как передать большие объекты, не разбивая объект?
Thanks Shawn, так где именно я это делаю? Это мой ServiceReferences.ClientConfig
<configuration>
<system.serviceModel>
<client>
<!--"http://sy01911.fw.gsjbw.com/WcfService1/Service1.svc"-->
<endpoint address="http://localhost/WcfService1/Service1.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService11"
contract="SilverlightApplication1.ServiceReference1.IService1"
name="BasicHttpBinding_IService1" />
</client>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService1" maxBufferSize="655360000"
maxReceivedMessageSize="655360000">
<security mode="None" />
</binding>
<binding name="BasicHttpBinding_IService11" maxBufferSize="655360000"
maxReceivedMessageSize="655360000">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
и это конфигурация сервера, который вы упомянули
<services>
<service name="WcfService1.Service1" behaviorConfiguration="WcfService1.Service1Behavior" >
<!-- Service Endpoints -->
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" >
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfService1.Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
Привет Шон, любой совет на мой комментарий ниже? – 2008-12-02 23:52:05