I am working with a legacy ASP web app that uses the MSXML2.ServerXMLHTTP.6.0 COM object to post data to another web server. The page that does this was working very nicely for several years. The organization we are posting to has recently made changes to their system and we are now required to post to a new server.
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.
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.