1

Migrated an applicatoin from Window Server 2003 to Window Server 2008 x64. We have a simple VBS script that goes outside the domain and grabs a XML document using a post request. The script works perfect on Windows Server 2003, however on the new server, we keep getting a status code of 407 (proxy authentication failed). I did verify that I could pull in a file without setting any proxy information from the intranet. Was there any change to the proxy credential methods in Server 2008?

Code Simplified:

Dim o
Set o = CreateObject("Msxml2.ServerXMLHTTP.6.0")
o.open "POST", "https://somesite.com", false 
o.setProxy 2, "myproxy:8080", ""
o.setProxyCredentials "user", "pass" 
o.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" 
o.send "loginId=USER&password=1234" 
While o.readyState <> 4
 o.waitForResponse 1000 
Wend
Wscript.echo o.status

It does seem the proxy is being contacted, because without it I get server name or address could not be resolved, however the proxy user/password are not being validated correctly, yet work on Window Server 2003.

Edit 20140303: It's been months and I still haven't figured this out. As we look to retire our Windows 2003 machines it's become increasingly important that I figure out what is going wrong.

I noticed if I changed my send data to incorrect UID/PWD I get a response back from the page (the incorrect login page). I don't understand why this works flawlessly on Server 2003 but seems impossible on Server 2008 R2.

If I open up IE on the same box, and use the same proxy information and access the same site with the same UID/PWD it also works. I did this to make sure there wasn't some sort of IP based block where the proxy or site UID/PWD only worked from the old machine.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Brad
  • 1,684
  • 4
  • 20
  • 36
  • I found someone who had the same issue as me and fixed it with forced Proxy-Authorization and Proxy-Connection headers. I tried these, even using Fiddler to make sure I was encoding the proxy user/password correctly and it's not working. curl works perfectly fine which is aggravating since it's not a acceptable solution in our environment according to our IS groups. Here's a link to the MSDN thread of someone with the same issue: http://social.msdn.microsoft.com/Forums/en-US/1d3970ca-27b5-4e73-aab8-3003635634d4/serverxmlhttp-not-sending-proxy-credentials-with-301-redirect?forum=xmlandnetfx – Brad Mar 03 '14 at 23:36

0 Answers0