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

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

博客园 - yellowyu

驴家网www.lvjia.cn全站全静态,其实技术在于活学活用 5年程序员流水帐总结,从开发到产品过渡 过滤HTML标签的几个函数 使用InternetSetCookie 从System.Environment.TickCount 看最大支持,机子开一开还是要重启一下的 JScript 中Date.getTime转.Net中的DateTime 转:关系数据库中关系模式的规范过程 个人宣传画 我的身体已不再属于我 每一条路都是坚辛的,从未有平坦的 程序员与白咖啡,一种心情 真实故事:我的女友 今天做了淘宝客了。。。呵呵 暂时离开!=不再CODE Remoting: 如何穿越防火墙 (转) .NET 中的对象序列化(转) Remoting :关于广域网事件回调失败与值传递 Winform:关于IM好友列表 Remoting(转)
解决WCF传输大数据量时出错
yellowyu · 2012-01-29 · via 博客园 - yellowyu

如不是很较真的应用,把缓冲区设大点就好了,再把序列化对象设大点

首先应将MaxReceivedMessageSize值设大,如:

<basicHttpBinding>
<binding name="basicBinding" maxReceivedMessageSize="2147483647"></binding>
</basicHttpBinding>

其次,应该将MaxItemsInObjectGraph值设大,如:

代码

<behavior name="bcf">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" /> <dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>

以上为服务器端设置,服务器端和客户端均应设大,客户端设置如下:

代码

<behaviors>
<endpointBehaviors>
<behavior name="bhc">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>

<basicHttpBinding>
   
<binding name="basicBinding" maxReceivedMessageSize="2147483647"></binding>
 
</basicHttpBinding>

 至此基本已经OK,如果再有问题,可将maxBufferSize、receiveTimeout值设大即可。