Httpwebreqest与提琴手工作。否则超时 [英] Httpwebreqest works with Fiddler On otherwise Timeout

查看:173
本文介绍了Httpwebreqest与提琴手工作。否则超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到一个奇怪的错误。我已经安装,工程perfectively当小提琴手是打开一个脚本 - 它从下载网站中使用报告HttpWebRequest和一切工作正常。

I am getting a weird error. I have setup a script that works perfectively when Fiddler is open - it downloads a report from a website using httpwebrequest and everything works fine!

然而它只能当小提琴手是开放的?当小提琴手心不是工作,我只是得到一个请求超时问题

HOWEVER it only works when Fiddler is open ? When fiddler isnt working I just get a "Request Timeout Issue"

有谁知道如何解决这一问题,并使其与我的ASP.NET MVC应用程序工作?

Does anyone know how to fix this and make it work with my ASP.NET MVC App?

感谢

编辑:感谢您​​的答复!关于代理 - 我想测试在Windows Azure上这个脚本 - 这么少的困惑,如何设置默认的代理设置

Thanks for the response! Regarding proxy - I wanted to test this script on Windows Azure - so little confused as to how to setup the default proxy settings ?

推荐答案

有关搜索,这里是另一个想法。我有操纵我的网站在一个机器人方式的应用程序。该应用程序在.NET 4.0中使用HttpWebRequest和HttpWebResponse。经过两个或两个3分成功GET的,未来将持续锁定。另一篇文章表明,没有正确关闭一个HINTERNET可能导致应用到框上的后续的GET到同一主机由于对平行连接到同一个主机的数量的限制。我不知道这是发生了什么事在幕后,但我想我会回去,并决定在那里我可以关闭的东西。

For searchers, here is another thought. I have an application that manipulates my website in a robotic fashion. The application uses HttpWebRequest and HttpWebResponse in .Net 4.0. After two or 3 successful GET's, the next would lock up consistently. Another post suggested that not properly closing an HINTERNET could cause an application to block on a subsequent GET to the same host due to a limit on the number of parallel connections to the same host. I don't know if this is what was happening under the covers, but I thought I would go back and determine where I could close things.

我关闭了所有我HttpWebResponse对象在code和我的问题就走了。从这个我不明白为什么提琴手会掩盖问题,但它没有。之前添加关闭时,序列中的特定请求将总是超时。收盘后的反应,这一切都清楚了,我可以不用通过提琴手的代理。

I closed all of my HttpWebResponse objects in the code and my issue went away. From this I don't see why Fiddler would mask the issue, but it did. Before adding the closes, a specific request in the sequence would consistently time out. After closing responses, that all cleared up and I could run without proxying through Fiddler.

这篇关于Httpwebreqest与提琴手工作。否则超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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