Microsoft KB Archive/289481

= You may need to run the Proxycfg tool for ServerXMLHTTP to work =

Article ID: 289481

Article Last Modified on 10/26/2007

-

APPLIES TO


 * Microsoft XML Parser 3.0

-



This article was previously published under Q289481



SUMMARY
Because of the limitations of Microsoft Win32 Internet (WinInet) functions, and the XMLHTTP object, the ServerXMLHTTP object was created to allow you to establish server-to-server HTTP connections. The ServerXMLHTTP object does not rely on WinInet but instead relies on a new HTTP client stack. The HTTP client stack is a subset of WinInet and offers a &quot;server-safe&quot; connection. The Proxy Configuration Utility (Proxycfg.exe) allows you to configure these WinHTTP proxy settings.



MORE INFORMATION
It is sometimes necessary to run Proxycfg.exe, especially in intranets that may or may not use proxy servers to connect to the Internet or to other servers.

When you use ServerXMLHTTP code, and you do not run Proxycfg, or you do not restart IIS after the installation, you often receive one of the following error messages:

Access Denied.

or

The server name or address cannot be resolved.

For additional information about the Proxycfgc tool, click the following article number to view the article in the Microsoft Knowledge Base:

830605 The Proxycfg.exe configuration tool is available for WinHTTP 5.1

Steps to configure WinHTTP for using ProxyCfg

 * 1) Make sure that ProxyCfg is in your System32 folder. If it is not, install one of the service packs or software that is mentioned earlier in this article.
 * 2) Determine the proxy server name (if any) that you use.
 * 3) At the command prompt, execute the proxycfg program with the settings that you want. Configure your computer by using the Proxy Config Utility.
 * 4) * To see the current proxy settings for WinHTTP, type proxycfg By default this should be &quot;Proxy Direct&quot;. If you have MSXML 3 sp1 or earlier, you may see that the settings say &quot;Not Set&quot;. At this point, you MUST type proxycfg -d to set the default proxy settings for WinHTTP.
 * 5) * To not use any proxy servers when connecting server-to-server, type proxycfg -d.
 * 6) * To use a proxy server when connecting server-to-server, type proxycfg -p, and add to the line the list of proxy servers you want to use. Also, you can add optional bypass lists for servers that will not be accessed through a proxy. You can find acceptable proxy server formats or bypass formats in the ReadMe.txt file.
 * 7) * To import the proxy information from WinInet and place them in the WinHTTP settings, type proxycfg -u
 * 8) Stop and restart Microsoft Internet Information Server (IIS).

The following are some command line examples of how to use proxycfg:
 * Example 1: proxycfg -d -p myProxyServer:80 &quot; &quot;

This example shows the most common use for Proxycfg.exe. This command specifies that both HTTP and HTTPS servers must be accessed through the proxy server that is named &quot;myProxyServer&quot; with a port number of &quot;80&quot;, unless the hostname does not contain a period. In this case, the -d option has no effect.
 * Example 2: proxycfg -p myProxyServer

This example specifies that both HTTP and HTTPS servers need to be accessed through the proxy server that is named myProxyServer. It specifies no bypass list.
 * Example 3: proxycfg -p &quot;http=http_proxy https=https_proxy&quot; &quot; ;*.microsoft.com&quot;

This example specifies that HTTP servers need to be accessed through the http_proxy proxy, and that HTTPS servers need to be accessed through https_proxy. Local intranet sites (for example, hostnames) that do not contain a period, and any site in the *.microsoft.com domain, bypass the proxy.

