the connection with the server was terminated abnormally xmlhttp
Asked Answered
F

5

10

I have this asp page test1.asp in the same server (different website) than this webservice. Thing is when i try to run this code

sUrl = "http://chat.xxxxx.com/UCWebServices/Chat.asmx/GetChatQueueByAddress?queueAddress=SALESCHAT"

result = HTTPPost(sUrl)

response.Write result

Function HTTPPost(sUrl)
  set oHTTP = CreateObject("Msxml2.ServerXMLHTTP")
  oHTTP.open "GET", sUrl,false
  oHTTP.send <-- it fails here <-- it fails here <-- it fails here <--
  if oHTTP.Status = 200 Then
     HTTPPost oHTTP.responseText
  End if
 End Function
%>

i get the following error

msxml3.dll error '80072efe'

The connection with the server was terminated abnormally

i googled up this issue thinking that maybe this was some little bs i could easily solve, but i am getting into some problems. It's not easy to make it work.

if we run the same page from anywhere else, then it works.

Any ideas?

Feliks answered 30/9, 2011 at 14:19 Comment(0)
A
8

This error code is ERROR_INTERNET_CONNECTION_ABORTED. The most common reasons are a firewall or anti-virus interfering with the connection, a proxy borking the connection data. I can also be caused by a name resolution issue -- for example, if the host name resolves to 127.0.0.1 locally and the web server is bound to the public IP address only.

Anemology answered 30/9, 2011 at 14:25 Comment(0)
R
1

Another possibility; the server at the far end may be filtering (and dropping) requests based on browser agent strings, to prevent programmatic scraping.

What happens when you just request that URL in a regular browser?

Revolving answered 1/10, 2011 at 20:5 Comment(0)
L
1

Some servers need a content-length header set for an HTTP POST to function properly. In our case (using serverXMLHttp) this was needed:

    xmlhttp.Open "POST", URL , false
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlhttp.setRequestHeader "Content-Length", Len(postdata)
Lisabethlisan answered 21/8, 2018 at 14:44 Comment(0)
M
1

(answering an old thread because its the first result for this message in Google)

I just ran in to this issue. It turned out that I was POSTing an empty string:

myString = FunctionThatWasReturningEmptyString()
set oHTTP = CreateObject("Msxml2.ServerXMLHTTP")
oHTTP.open "GET", sUrl, false
oHTTP.send myString

Once I fixed the function to return an empty XML set instead of an empty string, my error went away

Medarda answered 6/11, 2019 at 22:26 Comment(0)
C
0

When I got this error, the Event Logs indicated that w3wp.exe (the IIS App Pool) had crashed.

With Visual Studio, I opened the memory dump file that Event Viewer mentioned and the "Exception Information" had the message "The thread used up its stack."

It turned out that the code had a StackOverflowException that was crashing the app pool.

Corkwood answered 14/8, 2018 at 16:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.