Microsoft Knowledge Base Email Alertz

(289481) - 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...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 289481 - Last Review: October 26, 2007 - Revision: 4.2

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

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 "server-safe" 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  (http://kbalertz.com/Feedback.aspx?kbNumber=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.

REFERENCES

For additional information on ServerXMLHTTP, click the following article number to view the article in the Microsoft Knowledge Base:
281142  (http://kbalertz.com/Feedback.aspx?kbNumber=281142/ ) PRB: Load method fails when loading XML file over HTTP

APPLIES TO
  • Microsoft XML Parser 3.0
Keywords: 
kbproductlink kbinfo kbmsxmlnosweep KB289481
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate