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
"server-safe" connection. The Proxy Configuration Utility (Proxycfg.exe) allows
you to configure these WinHTTP proxy settings.
Back to the top
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 (http://support.microsoft.com/kb/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.
| • | To see the current proxy settings for WinHTTP, type
proxycfg By default this should be "Proxy Direct". If
you have MSXML 3 sp1 or earlier, you may see that the settings say "Not Set".
At this point, you MUST type proxycfg -d to set the
default proxy settings for WinHTTP. | | • | To not use any proxy servers when connecting
server-to-server, type proxycfg -d. | | • | 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. | | • | To import the proxy information from WinInet and place
them in the WinHTTP settings, type proxycfg
-u |
|
| 4. | 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 "<local>"
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 "myProxyServer" with a port number of "80", 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 "http=http_proxy https=https_proxy"
"<local>;*.microsoft.com"
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. |
Back to the top
For additional information on ServerXMLHTTP, click the following article number to view the article in the Microsoft Knowledge Base:
281142 (http://support.microsoft.com/kb/281142/)
PRB: Load method fails when loading XML file over HTTP
Back to the top