惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - Smthhy

从公司管理到IT审计-网摘 如何为PDF文件添加书签 ARCGIS DESKTOP 安装步骤 - Smthhy ms Sql server 中的getDate()函数使用方法总结 WCF客户端调用服务 出现套接字连接已中止...... C语言中time_t到.NET的转换与更改系统时间 Thread and Sync In C# (C#中的线程与同步) sql 跨服务器查询 div自适应高度 - Smthhy - 博客园 js中event.x,event.clientX,event.offsetX区别 JS模拟出 getElementsByClassName 功能 - Smthhy jQuery对象与DOM对象之间的转换 - Smthhy - 博客园 语言代号一览表 收集 IE Flash10b.ocx加载项失败 解决 解决Aptana无高亮显示,无提示问题 WebBrowser 打印设置,打印预览,去页眉和页脚 ASP.NET State Service - Smthhy 尝试创建Web项目或打开位于URL“http ://localhost/WebApplication1”的Web 项目 C# winform 打印当前窗体 - Smthhy
解决WCF传输大数据量时出错并提示:远程主机强迫关闭了一个现有的连接
Smthhy · 2012-08-08 · via 博客园 - Smthhy

在用到WCF通讯的项目中,在将业务逻辑服务器内存中的数据,传输至ERP界面的显示,以后在查询服务器上的数据时,避免进入KVM出现的卡壳现象。已将服务器内存数据全部提供服务让ERP进行调用,所有数据都可以,但是在驾驶员数据(7000以上)和注册的设备ID数据(3000)以上,两者数据请求出现远程主机强迫关闭了一个现有的连接的问题,数据量一大则出现此种情。经过多次资料查询,解决了此问题,进行记录,以防再次有类似情况

服务器端配置

maxBufferSize与maxReceivedMessageSize设大数据值“2147483647”

 <basicHttpBinding>
        <binding name="BasicHttpBindingConfig" receiveTimeout="00:00:30"
          sendTimeout="00:00:30" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
 </basicHttpBinding>

其次,将MaxItemsInObjectGraph值设大
<behavior name="BasicHttpBehavior">
          <serviceThrottling maxConcurrentSessions="10000" maxConcurrentInstances="1000" maxConcurrentCalls="1000" />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <serviceMetadata httpGetEnabled="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />  
        </behavior>

再次即设置客户端配置项
将maxItemsInObjectGraph设大
<behaviors>
      <endpointBehaviors>
        <behavior name="BasicHttpBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>

同样将maxBufferSize与maxReceivedMessageSize设大数据值“2147483647”

<binding name="BasicHttpBinding_IHandleWeb" closeTimeout="00:01:00"
     openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
     allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
     maxBufferSize="2147483647" maxBufferPoolSize="5242880000" maxReceivedMessageSize="2147483647"
     messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
     useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
      maxBytesPerRead="4096" maxNameTableCharCount="16384" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None"
       realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>