解决webrequest出现操作超时的方案

1.问题出现场景

当网站内部有多个线程同时启用httpwebrequest请求数据时,在GetRequestStream 方法时出现操作超时

2.解决方案

  在webconfig 里面配置   

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

其中的maxconnection可根据需要进行设置

posted @ 2018-05-29 16:49  JakeLong  阅读(321)  评论(0)    收藏  举报