<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>proxy | LogikDevelopment</title>
	<atom:link href="https://www.logikdev.com/tag/proxy/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.logikdev.com</link>
	<description>&#34;Il n&#039;y a pas de problème, il n&#039;y a que des solutions. L&#039;esprit de l&#039;homme invente ensuite le problème.&#34; André Gide</description>
	<lastBuildDate>Tue, 25 Apr 2017 13:57:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>
	<item>
		<title>Use ServerXMLHTTP through a proxy</title>
		<link>https://www.logikdev.com/2010/07/07/use-serverxmlhttp-through-proxy/</link>
					<comments>https://www.logikdev.com/2010/07/07/use-serverxmlhttp-through-proxy/#comments</comments>
		
		<dc:creator><![CDATA[smoreau]]></dc:creator>
		<pubDate>Wed, 07 Jul 2010 19:22:17 +0000</pubDate>
				<category><![CDATA[Tricks]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[proxycfg tool]]></category>
		<category><![CDATA[ServerXMLHTTP]]></category>
		<guid isPermaLink="false">https://www.logikdev.com/?p=647</guid>

					<description><![CDATA[<p>The other day, I was trying to use the ServerXMLHTTP object. For information, this object was created to allow you to establish server-to-server HTTP connections. The code I firstly wrote looked like the following: with sURL the URL to call and sParams the parameters to send with the URL. The problem was that oXMLHTTP.responseText didn&#8217;t [&#8230;]</p>
<p>The post <a href="https://www.logikdev.com/2010/07/07/use-serverxmlhttp-through-proxy/">Use ServerXMLHTTP through a proxy</a> first appeared on <a href="https://www.logikdev.com">LogikDevelopment</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The other day, I was trying to use the <strong>ServerXMLHTTP</strong> object. For information, this object was created to allow you to establish server-to-server HTTP connections.</p>
<p>The code I firstly wrote looked like the following:</p>
<pre class="brush: vb; title: ; notranslate">
Dim oXMLHTTP
Set oXMLHTTP = Server.CreateObject(&quot;MSXML2.ServerXMLHTTP&quot;)
oXMLHTTP.open &quot;POST&quot;, sURL, false
oXMLHTTP.setRequestHeader &quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;
oXMLHTTP.send sParams
Response.Write oXMLHTTP.responseText
</pre>
<p>with <code>sURL</code> the URL to call and <code>sParams</code> the parameters to send with the URL.</p>
<p>The problem was that <code>oXMLHTTP.responseText</code> didn&#8217;t return anything. Or to be exact, it returned an empty string, which was obviously not the expected response&#8230; <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>After some investigation, it appeared that the problem was because the server was seating behind a proxy. All this is good and well, but the question now is how to tell the application to use the proxy?<br />
<br />
First of all, the ServerXMLHTTP object has a <code>setProxy</code> method:<br />
<a href="http://msdn.microsoft.com/en-us/library/ms760236(v=VS.85).aspx">http://msdn.microsoft.com/en-us/library/ms760236(v=VS.85).aspx</a><br />
So I tried to add the following line to the previous code:</p>
<pre class="brush: vb; title: ; notranslate">
oXMLHTTP.setProxy 2, &quot;myProxyServer:80&quot;, &quot;&quot;
</pre>
<p>Unfortunately, this didn&#8217;t fix the problem. It looks like this line is simply ignored. If somebody knows why, please tell me! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
<br />
So the solution I finally adopted was to configure the proxy through the <strong>proxycfg</strong> tool.<br />
There are two ways of using this tool:</p>
<ul>
<li>Import the proxy settings from the current user&#8217;s Microsoft Internet Explorer manual settings using the command <code>proxycfg.exe -u</code></li>
<li>Configure the proxy settings manually using the command <code>proxycfg -p myProxyServer:80</code></li>
</ul>
<p>This last solution works for me and I hope it will help a few people. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
<br />
<strong>PS:</strong> I found the following page when writing this article: <a href="http://support.microsoft.com/kb/289481/">http://support.microsoft.com/kb/289481/</a>. It would have been so good to find it during my investigation but anyway.</p><p>The post <a href="https://www.logikdev.com/2010/07/07/use-serverxmlhttp-through-proxy/">Use ServerXMLHTTP through a proxy</a> first appeared on <a href="https://www.logikdev.com">LogikDevelopment</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.logikdev.com/2010/07/07/use-serverxmlhttp-through-proxy/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
