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

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 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>