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

推荐订阅源

D
DataBreaches.Net
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
D
Docker
J
Java Code Geeks
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
腾讯CDC
罗磊的独立博客
U
Unit 42
爱范儿
爱范儿
Vercel News
Vercel News
MyScale Blog
MyScale Blog

博客园 - Amonw's Weblog

homekit2mqtt on DietPi .Net Trace->Listeners->Remove Oracle 12c client with .NET legacy Oracle driver Minimum setup for Apache+AD SSO Minimum configuration for openldap to proxy multiple AD into a single search base 排列组合算法(PHP) Make Notepad++ auto close HTML/XML tags after the slash(the Dreamweaver way) ASDM through site to site VPN - Amonw's Weblog PHP, LDAPS and Apache DFS security warning and use group policy to set up internet security zones Refresh recovery area usage data after manually deleting files under recovery area Create Oracle Enterprise Manager repository data after restore a database from another server Restore Oracle database to another server .PRT extension and multiple NX versions Fix network adapter not present problem in cloned CentOS NX 8.5 License Server Firewall Setting Cisco ASA intra-interface routing How to configure windows machine to allow file sharing with dns alias (CNAME) Install unifi controller on CentOS
.NET默认一个客户端对同一个服务器地址同时只能建立2个TCP连接
Amonw's Weblog · 2019-01-05 · via 博客园 - Amonw's Weblog

Amonw's Weblog

Slices of computers, programming and living

做一个客户端的测试小程序测试web service的并发处理。开始用async task做,不管创建多少个task,用netstat看同时只有两个tcp连接。以为是async task的问题,改用BackgroundWorker和多线程都是同样的问题,经google得知原来是.NET默认一个客户端对同一个服务器地址同时只能建立2个TCP连接。在app.config里增加下面一段解决问题(不管用async task,BackgroundWorker还是多线程都一样):

    <system.net>
        <connectionManagement>
            <add address="*" maxconnection="20" />
        </connectionManagement>
    </system.net>

posted on 2019-01-05 02:01  Amonw's Weblog  阅读(251)  评论(0)    收藏  举报

刷新页面返回顶部