Silveright调用WCF保存大数据时,直接在客户端报“ 远程服务器返回了错误:Not Found ”问题,少量是没问题,如下图:

后面在这个文章中找到解决办法: http://www.cnblogs.com/yjmyzz/archive/2011/06/29/2093829.html

顺道贴出来一下,有需之则取之。

ServiceReferences.ClientConfig 客户配置文件:

<configuration>
<system.serviceModel>
<bindings> <basicHttpBinding>
<binding name="BasicHttpBinding_IModuleAService" maxBufferSize=""
maxReceivedMessageSize=""
openTimeout ="00:10:00"
receiveTimeout ="00:10:00"
sendTimeout ="00:10:00"
closeTimeout ="00:10:00">
<security mode="None" />
</binding>
</basicHttpBinding> <!--下面这个节点是关键,通讯数据量-->
<customBinding>
<binding name="BasicHttpBinding_ModuleAService">
<textMessageEncoding messageVersion="Default" writeEncoding="utf-8" />
<httpTransport maxReceivedMessageSize="" maxBufferSize="" transferMode="Buffered" />
</binding>
</customBinding> </bindings>
<client>
<endpoint address="http://localhost:77886/ModuleAService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IModuleAService"
contract="ModuleAService.IModuleAService" name="BasicHttpBinding_IModuleAService" />
</client>
</system.serviceModel>
</configuration>

Web.Config 服务端配置文件:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections> </configSections> <system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" maxRequestLength="" />
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="BasicHttpBehavior" name="ModuleAService.ModuleAService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IModuleAService" contract="ModuleAService.IModuleAService" />
</service>
</services>
<behaviors>
<serviceBehaviors> <behavior name="BasicHttpBehavior">
<serviceThrottling maxConcurrentSessions="" maxConcurrentInstances="" maxConcurrentCalls="" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<dataContractSerializer maxItemsInObjectGraph="" /> <serviceTimeouts transactionTimeout="00:10:00" />
</behavior> </serviceBehaviors> </behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IModuleAService" maxBufferSize="" maxReceivedMessageSize="" maxBufferPoolSize=""
sendTimeout="00:10:00" receiveTimeout="00:10:00" closeTimeout="00:10:00" openTimeout ="00:10:00" messageEncoding="Text"
transferMode="Streamed" useDefaultWebProxy="true"> <readerQuotas maxDepth="" maxStringContentLength="" maxArrayLength="" maxBytesPerRead="" maxNameTableCharCount="" /> <security mode="None" >
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security> </binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IModuleAService" contract="ModuleAService.IModuleAService" name="" />
</client>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>

最新文章

  1. 关于Three.js基本几何形状之SphereGeometry球体学习
  2. 解决域名DNS解析的故障
  3. CDC和HDC的区别与转换
  4. github 使用网址
  5. this call和apply
  6. [转载] iptables配置实践
  7. 转--android Toast大全(五种情形)建立属于你自己的Toast
  8. ExtJs布局之table
  9. Android 通过xml 自定义图片
  10. HTML 详细介绍
  11. Smarty自定义函数
  12. SqlServer和Oracle中一些常用的sql语句5 流程控制语句
  13. OC实现同步访问属性
  14. JavaScript实现弹窗报错
  15. 发布 ASP.NET Core 2.x 应用到 Ubuntu
  16. 在Java里&gt;、&gt;&gt;、&gt;&gt;&gt;的含义
  17. Spring IOC 低级容器解析
  18. Js_特效
  19. English trip -- VC(情景课)2 D Reading
  20. hdu3374 kmp+最小表示法

热门文章

  1. python学习day3 编程语言分类 变量 格式化输出
  2. Tableau-安装的坑
  3. windows 下 wamp php单元测试工具PHPUnit的安装
  4. 一些网站的meta标签的作用
  5. 15种css居中方式
  6. TOJ1302: 简单计算器 &amp;&amp; TOJ 4873: 表达式求值&amp;&amp;TOJ3231: 表达式求值
  7. mysql数据库分区及测试
  8. jquery一些容易混淆的
  9. f5 Syslog管理
  10. HTML基础学习笔记(2)