中提到的建议纠正了我的 HttpWebRequest 初始调用缓慢的问题
我使用为什么此 WebRequest 代码很慢 ?
提到的建议之一是将代理设置为空,事情会加速。
我已经做到了这一点并且有效。
但是,当我在某些客户端站点部署此功能时,我担心这种影响......
可能在某些已将其域配置为通过代理到达我正在其中发出 HttpWebRequest 的服务器的客户端站点上。
将 Proxy 正确设置为 null 会对此产生影响吗?
谢谢
I rectified my HttpWebRequest initial calls being slow by using the suggestion mentioned at
Why is this WebRequest code slow?
One of the suggestions mentioned to set the Proxy to null and things will speed up.
I have done this and it worked.
However Im concerned about the impact of this when I deploy this at some client sites....
It may be at some client sites that have configured their domain to go through a proxy to reach the server in which I am making my HttpWebRequest to.
Will setting Proxy properly to null impinge upon this?
Thanks
发布评论
评论(1)
我也想知道同样的事情。不过,我无法找到这个问题的任何答案。
但是,我确实发现,通过向应用程序配置文件添加设置,您可以实现与硬编码 httprequest.Proxy = null 相同的效果:
我的想法是,如果我发现自己在客户站点上,我需要更改自动代理检测 我可以从配置文件中删除设置。
我在以下站点找到了此修复:
http://weblog.west-wind.com/posts/2005/Dec/14/Slow-Http-client-calls-from-ASPNET-20-Make-sure-you-check-your-代理设置
I wondered the same thing too. I was not able to find any answer to this question, though.
However, I did find that you can accomplish the same effect as hard coding httprequest.Proxy = null by adding a setting to the application config file:
My thinking is that if I ever find myself at a customer site where I need to change the automatic proxy detection I can remove the settings from the config file.
I found this fix at the following site:
http://weblog.west-wind.com/posts/2005/Dec/14/Slow-Http-client-calls-from-ASPNET-20-Make-sure-you-check-your-Proxy-Settings