Fracture
asked on
MSXML2.XMLHTTP exception occurred
Hi,
We are using the MSXML2.XMLHTTP component to send xml via post to a parent website and retreive results back. This gets called hundreds to thousands times a day.
The code works great for a while, but about once a week, sometimes two weeks the MSXML2.XMLHTTP object seems to shut down and fails on the .send call
The exact error is - An exception occurred: 'objXMLhttp.send'
Here is the code -
Public Function GetResponse
gXML = "<?xml version=""1.0"" encoding=""UTF-8""?>"&gXML
Set objXMLhttp = server.Createobject("MSXML 2.XMLHTTP" )
objXMLhttp.Open "POST", "http://url" ,False
objXMLhttp.setRequestHeade r "Content-Type", "application/x-www-form-ur lencoded"
objXMLhttp.send gXML
GetResponse = objXMLhttp.responsetext
End Function
It is very hard to troubleshoot and it only seems to happen on our live server, and when it does we dont have time to test and troubleshoot so we usually just restart the server, which always fixes the problem.
I have done alot of searches on google and this seems to be a common problem, have found alot of similar cases but no answer as to why the object will be fine for a while then suddenly stop working across the board and throw the above error.
Any ideas?
Thanks in advance :)
Fracture
We are using the MSXML2.XMLHTTP component to send xml via post to a parent website and retreive results back. This gets called hundreds to thousands times a day.
The code works great for a while, but about once a week, sometimes two weeks the MSXML2.XMLHTTP object seems to shut down and fails on the .send call
The exact error is - An exception occurred: 'objXMLhttp.send'
Here is the code -
Public Function GetResponse
gXML = "<?xml version=""1.0"" encoding=""UTF-8""?>"&gXML
Set objXMLhttp = server.Createobject("MSXML
objXMLhttp.Open "POST", "http://url" ,False
objXMLhttp.setRequestHeade
objXMLhttp.send gXML
GetResponse = objXMLhttp.responsetext
End Function
It is very hard to troubleshoot and it only seems to happen on our live server, and when it does we dont have time to test and troubleshoot so we usually just restart the server, which always fixes the problem.
I have done alot of searches on google and this seems to be a common problem, have found alot of similar cases but no answer as to why the object will be fine for a while then suddenly stop working across the board and throw the above error.
Any ideas?
Thanks in advance :)
Fracture
This is a common issue. We have found that switching to MSXML2.ServerXMLHTTP is more reliable.
ASKER
Hi Carl,
Thanks for your reply, gives me alot of relief that MSXML2.ServerXMLHTTP is more reliable. Before we change this over, in your experience are there any significant differences between the two components, ie. are all their properties/methods the same?
Cheers,
Fracture
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey Carl,
Thanks heaps for your responses on this, will move over to the server component and see how we go.
Kind Regards,
Fracture
Thanks heaps for your responses on this, will move over to the server component and see how we go.
Kind Regards,
Fracture