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("MSXML2.XMLHTTP")
      objXMLhttp.Open "POST", "http://url" ,False
      objXMLhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
      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
FractureAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
This is a common issue. We have found that switching to MSXML2.ServerXMLHTTP is more reliable.
0
FractureAuthor Commented:

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
0
Carl TawnSystems and Integration DeveloperCommented:
As far as I am aware they are. I'm not sure of the specifics of the differences albeit that the ServerXMLHTTP seems to be the Server specific version of the XMLHTTP object. I don't know if that is official, but its seems about right, and makes sense.

I can't say 100% it will fix your problem, but we had a similar issue woth our code base and the switch sorted it for us.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FractureAuthor Commented:
Hey Carl,

Thanks heaps for your responses on this, will move over to the server component and see how we go.

Kind Regards,

Fracture
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.