Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Solution to XMLHTTP error 800c0008 (-2148270088) in requesting XML over HTTPS >Thread Next - Re: Solution to XMLHTTP error 800c0008 (-2148270088) in requesting XML over HTTPS Re: Solution to XMLHTTP error 800c0008 (-2148270088) in requesting XML over HTTPSTo: NULL Date: 10/2/2007 10:16:00 AM <ricky.blaha@g...> wrote in message news:1190912418.865496.221810@g...... > I didn't find a clear solution to this error in any posts, so here it > is FYI...hope it saves the reader some headaches! > > Problem: > Server-to-server XML using the XMLHTTP object requesting XML from a > secure SSL (HTTPS) page, throws error 800c0008 (-2148270088) and the > message: "The download of the specified resource has failed." > > Solution: > Use the "Msxml2.ServerXMLHTTP" object instead of the regular "XMLHTTP" > object. For some reason the regular object works server-to-server over > HTTP, but when using HTTPS, only the ServerXMLHTTP object will work. > > Reason, according to MSDN: > "The only supported method for making HTTP requests from server-side > ASP script is if you use ServerXMLHTTP object (MSXML2.ServerXMLHTTP) > that is provided with XML 3.0 or later." (http://support.microsoft.com/ > kb/237906) > > See the ServerXMLHTTP Reference here: http://msdn2.microsoft.com/en-us/library/ms754586.aspx > > Note: If the XML you are requesting has an XML declaration, make sure > that declaration is the first thing in the response (i.e. no empty > lines before it), otherwise ServerXMLHTTP will be not be able to > populate "responseXML" (but it will be able to populate > "responseText"). > ResponseXML will have a parseError. Strictly speaking the xml specification indicates that the declaration should not be preceeded by anything and that includes whitespace. Older implementations of msxml (pre version 3) were more permissive and allowed whitespace before the declare. With MSXML DOM instances created using progIDs such as Microsoft.XMLDOM and MSXML2.DOMDocument or their CLSID equivalents implement a Load method that is tolerant of the whitespace. Using the more specific ProgID MSXML3.DOMDocument.3.0 would result in a DOM instance whose load method would apply the XML standard more strictly. It is an instance of this DOM that ServerXMLHTTP exposes. It should also be noted that a server sending XML content to be loaded in this way must specify the content-type as an xml type such as "text/xml". If not ServerXMLHTTP won't even attempt to load the DOM. -- Anthony Jones - MVP ASP/ASP.NET | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
