I am getting an issue delivering XML through Microsoft.XMLHTTP object in ASP (not .Internet). I've CDATA elements inside a few of the XML nodes and that i understand this error while attempting to send.

msxml3.dll error '80070005' Access is refused.

To begin with, this only pops up with CDATA. Basically take it off, all transmits allright. Used to do just a little searching and discovered that i have to create an MSXML2.ServerXMLHTTP object BUT hosting server appears to not support this and that i get invalid request error...

Here's ASP delivering code:

Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")

xmlhttp.Open "Publish", m_sURL, False

xmlhttp.Send m_sXMLString

So, can there be anyway to transmit XML with CDATA using Microsoft.XMLHTTP? Thanks!

To begin with you should not be utilising the Microsoft.XMLHTTP in ASP. It isn't thread safe and will cause your application to fail inexplicably along with other customer sites if you are on the shared platform.

You ought to be using MSXML2.ServerXMLHTTP rather.

It's also wise to set this content type header:

Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")

xmlhttp.setRequestHeader "Content-Type", "text/xml"

xmlhttp.Open "Publish", m_sURL, False

xmlhttp.Send m_sXMLString

And something final factor, avoid using a title value pair for that content you are posting towards the remote server. Just send the XML itself.

Please are you able to publish the mistake you are getting, make sure to switch off friendly HTTP error messages inside your browser (if IE Tools -> Options -> Advanced -> Show friendly HTTP error messages [uncheck])


Thank you for responding to. Which error exactly do you want?

If using Microsoft.XMLHTTP, i quickly get

msxml3.dll error '80070005'

Access is refused

about this line:

xmlhttp.Send m_sXMLString    ' XML consists of CDATA

Basically use MSXML2.ServerXMLHTTP, i quickly get internal server error (500) here:

Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")

Oh, and that i will have the header. I simply did not publish it here.