I have a VB6 program running on Windows Server 2003 (32 bit) that uses the Microsoft ServerXMLHTTP object to make a HTTP connection to a web service using NTLM authentication. To get the authentication to work I have to configure the winhttp proxy to put the destination server in the proxy bypass list by running
proxycfg -p proxy-server dest-web-server
in a command prompt.
Having done this each call to the web service results in 3 HTTP calls to the web server as the ServerXMLHTTP object first tries anonymous access, followed by 2 calls to make the NTLM authentication happen. This is all normal and expected.
After migrating the program to Windows Server 2008 (64 bit), and using the equivalent proxy setting in a command prompt
netsh winhttp set proxy proxy-server="proxy-server" bypass-list="dest-web-server"
the NTLM authentication no longer works. The web server logs show that the ServerXMLHTTP object is only making one anonymous HTTP connection and returning a 401 response, and never attempting NTLM authentication.
The key to the solution is that the program moved from a 32 bit server to a 64 bit server. There are separate winhttp settings for 32 bit programs and 64 bit programs.
To get authentication happening again I needed to open the 32 bit command prompt “c:\windows\SysWOW64\cmd.exe” and run the netsh proxy settings utility from there.