<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How does maxconnection work for a System.Net.HttpWebRequest using a proxy?</title><link>http://blogs.msdn.com/tom/archive/2008/09/16/how-does-maxconnection-work-for-a-system-net-httpwebrequest-using-a-proxy.aspx</link><description>When using a WebRequest, one important thing to keep in mind is how many connections are allowed to be made to the same server.&amp;#160; The maxConnection setting will affect how many connections you can concurrently have to a given server.&amp;#160; When you</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How does maxconnection work for a System.Net.HttpWebRequest using a proxy?</title><link>http://blogs.msdn.com/tom/archive/2008/09/16/how-does-maxconnection-work-for-a-system-net-httpwebrequest-using-a-proxy.aspx#8955621</link><pubDate>Wed, 17 Sep 2008 17:56:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8955621</guid><dc:creator>daveblack</dc:creator><description>&lt;p&gt;It's so helpful to see the real-world solutions that are used. &amp;nbsp;Thanks for sharing with the Community : )&lt;/p&gt;</description></item><item><title>re: How does maxconnection work for a System.Net.HttpWebRequest using a proxy?</title><link>http://blogs.msdn.com/tom/archive/2008/09/16/how-does-maxconnection-work-for-a-system-net-httpwebrequest-using-a-proxy.aspx#8955762</link><pubDate>Wed, 17 Sep 2008 19:31:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8955762</guid><dc:creator>daveblack</dc:creator><description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;I have 2 questions:&lt;/P&gt;
&lt;P&gt;According to MSDN:&lt;/P&gt;
&lt;P&gt;&amp;lt;quote&amp;gt;&lt;/P&gt;
&lt;P&gt;If the Proxy property is specified, then the proxy settings from the Proxy property override the local computer or application config file and the HttpWebRequest instance will use the proxy settings specified. If no proxy is specified in a config file and the Proxy property is unspecified, the HttpWebRequest class uses the proxy settings inherited from Internet Explorer on the local computer. If there are no proxy settings in Internet Explorer, the request is sent directly to the server.&lt;/P&gt;
&lt;P&gt;&amp;lt;/quote&amp;gt;&lt;/P&gt;
&lt;P&gt;1. Wouldn't a best practice be to always set the MaxConnections in the config file just because you can't be sure how things outside of your control are configured?&lt;/P&gt;
&lt;P&gt;2. How does the MaxConections setting interact with HTTP KeepAlives if KeepAlives are enabled on the other end of the wire?&lt;/P&gt;</description></item><item><title>re: How does maxconnection work for a System.Net.HttpWebRequest using a proxy?</title><link>http://blogs.msdn.com/tom/archive/2008/09/16/how-does-maxconnection-work-for-a-system-net-httpwebrequest-using-a-proxy.aspx#8956094</link><pubDate>Wed, 17 Sep 2008 22:51:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8956094</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Daveblack,&lt;/p&gt;
&lt;p&gt;For #1, that can be a good best practice, but you have to remember that this setting is set in machine.config so it will affect all .NET applications that use System.Net. &amp;nbsp;So you may not want to allow other applications to connect that many times.&lt;/p&gt;
&lt;p&gt;For #2, great question. &amp;nbsp;My understanding is that if you have a loop and make multiple requests on the same System.Net object, KeepAlives will be used to go on the same TCP port. &amp;nbsp;If you have multiple unique requests coming in, they will not reuse the TCP port. &amp;nbsp;Although I am not 100% sure of that.&lt;/p&gt;
</description></item><item><title>re: How does maxconnection work for a System.Net.HttpWebRequest using a proxy?</title><link>http://blogs.msdn.com/tom/archive/2008/09/16/how-does-maxconnection-work-for-a-system-net-httpwebrequest-using-a-proxy.aspx#8956535</link><pubDate>Thu, 18 Sep 2008 05:27:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8956535</guid><dc:creator>Goolt</dc:creator><description>&lt;p&gt;I have searched the net and I should say I have not come across an article like this which is so easy to understand and learn the concepts.&lt;/p&gt;
&lt;p&gt;cheers!!&lt;/p&gt;</description></item><item><title>re: How does maxconnection work for a System.Net.HttpWebRequest using a proxy?</title><link>http://blogs.msdn.com/tom/archive/2008/09/16/how-does-maxconnection-work-for-a-system-net-httpwebrequest-using-a-proxy.aspx#8956589</link><pubDate>Thu, 18 Sep 2008 06:17:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8956589</guid><dc:creator>daveblack</dc:creator><description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;According to MSDN, you can use the "connectionManagement" element in both the application config as well as the machine.config. &amp;nbsp;See &lt;A href="http://msdn.microsoft.com/en-us/library/fb6y0fyc.aspx" target=_new rel=nofollow&gt;http://msdn.microsoft.com/en-us/library/fb6y0fyc.aspx&lt;/A&gt;&lt;/P&gt;</description></item><item><title>re: How does maxconnection work for a System.Net.HttpWebRequest using a proxy?</title><link>http://blogs.msdn.com/tom/archive/2008/09/16/how-does-maxconnection-work-for-a-system-net-httpwebrequest-using-a-proxy.aspx#8957116</link><pubDate>Thu, 18 Sep 2008 13:47:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8957116</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Daveblack,&lt;/p&gt;
&lt;p&gt;While that is true, the bulk of the time, it will get changed in machine.config and then you will forget about it and when a new application is deployed, it will use the same settings.&lt;/p&gt;
</description></item></channel></rss>