在3.5SP1 Htt​​pWebRequest的超时 [英] HttpWebRequest timeout in 3.5sp1

查看:110
本文介绍了在3.5SP1 Htt​​pWebRequest的超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有打开多个HttpWebRequests的服务。它在3.0跑了罚款,直到我们升级了服务器到.NET 3.5SP1。现在,我们得到超时同时等待该请求。 (我们已经验证端点启动并运行)。

We have a service that opens several HttpWebRequests. It ran fine under 3.0 until we upgraded the server to .net 3.5sp1. Now we get timeouts while waiting for the request. (we have verified that the endpoint is up and running).

有几件事,使这个有趣。增加最大连接数将让它的运行超时发生前一会儿。此外,一旦我们看到了请求等待,如果我们打开提琴手他们都成功。这些请求通过一个定时器,所以我们可以看到死锁(每一个经过的委托被调用时,它会生成一个新的线程),但code基开放并没有改变,我们没有在3.0这个问题

There are a few things that make this interesting. Increasing the number of max connections will let it run for a little longer before the timeouts occur. Also, once we see the requests waiting, if we open Fiddler they all succeed. These requests open via a Timer (which spawns a new thread every time the Elapsed delegate is called) so we could be seeing deadlocking, but the code base hasn't changed and we didn't have this problem under 3.0

我想我的问题是,没有任何人有打算要解决这个任何提示?有什么在HttpWebRequest的在SP1中改变,将导致我们看到了这种行为?

I guess my question is, does anyone have any tips on going about to solve this? Has anything changed in the HttpWebRequest in sp1 that would cause us to see this behavior?

推荐答案

为了存档这里是我们找到了解决办法:

For archiving purposes here is the solution we found:

的KeepAlive属性设置为false,似乎解决了问题,但是它确实慢下来每个请求位。

Setting the KeepAlive property to false seems to fix the problem, however it does slow down each request a bit.

这篇关于在3.5SP1 Htt​​pWebRequest的超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆