The new server seems to be behind a Citrix NetScaler load balancing
appliance. Either the ServerXmlHttp object or this appliance are doing a poor
job of handling HTTP/1.1 KeepAlive requests.
By default, the v4+ of the ServerXmlHttp object is making HTTP 1.1 requests
which are being kept alive for a while and are eventually closed by this new
server (or the NetScaler appliance). If this happens during a request, the
following error is returned by the ServerXmlHttp object:
msxml6.dll error '80072efe'
The connection with the server was terminated abnormally
In an attempt to force the connection to close rather than KeepAlive, I have
tried setting the Connection header to "close" like so:
set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
xmlhttp.setTimeouts 0, 60000, 120000, 120000
xmlhttp.open "POST", sPostUrl, False, sLogin, sPassword
xmlhttp.setRequestHeader "Connection", "close"
xmlhttp.send sPostXml
sResultXml = xmlhttp.responseText
The "terminated abnormally" error is ALWAYS returned when the Connection
header is set to "close."
We have tested this using the WinHttpRequest object in an ASP.NET
implementation and encountered the same error. In .NET, our salivation was
setting the HttpWebRequest.KeepAlive to false and the ProtocolVersion to
HttpVersion.Version10.
I have searched for hours and cannot find a way to force the ServerXmlHttp
to do something similar. Is there any way to force it to submit the request
as HTTP/1.0 and turn off keep-alives?
I realize the ideal solution would be to deploy our ASP.NET implementation
or "fix" this new server but neither of those are viable options right now.
Any guidance or assistance will be greatly appreciated.
Use the WinHttpRequest instead:-
Const WinHttpRequestOption_EnableHttp1_1 = 17
Dim oWinHTTP
Dim oStream
Set oWinHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
oWinHTTP.SetTimeouts 0, 60000, 120000, 120000
oWinHTTP.Option(WinHttpRequestOption_EnableHttp1_1) = False
oWinHTTP.Open "POST", sPostUrl, False, sLogin, sPassword
oWinHTTP.Send
sResult = oWinHTTP.ResponseText
I would strongly recommend you find get a copy of
http://www.fiddlertool.com/fiddler and observe the convesation between your
code and the server, it seems likely that the server is mis-behaving and its
worth infoming the server owners of that.
--
Anthony Jones - MVP ASP/ASP.NET