Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 272359 - Last Review: May 11, 2006 - Revision: 3.2
BUG: Load Method Fails to Load XML Documents over SSL Connection
This article was previously published under Q272359
When you use the
Load method of the XMLDOM object model to synchronously load an Extensible Markup Language (XML) document on a client computer over an SSL connection, the method fails with error 0x800c0007 and the INET_E_DATA_NOT_AVAILABLE return value.
This problem occurs when the file is not cached on the client computer. There are several reasons why the file may not be cached:
- The user selects the Do not save encrypted pages to disk check box on the Advanced tab of the Internet Options dialog box.
- The server sends a Pragma:no-cache or Cache-control:no-cache header.
- If you are using Microsoft Internet Information Server (IIS), the Content-Expiration option is set to Expire Immediately, which sends no-cache headers as well as the Expires:0 http header.
To resolve this problem, perform the following steps:
- In Internet Explorer, on the Tools menu, click Internet Options. On the Advanced tab, clear the Do not save encrypted pages to disk check box.
- Make sure that the server does not send no-cache headers.
- In IIS, in the Microsoft Management Console (MMC) snap-in, right-click the XML file. On the HTTP Headers tab, turn off the Content-Expiration option.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Steps to Reproduce Behavior
- In Internet Explorer, on the Tools menu, click Internet Options. On the Advanced tab, clear the Do not save encrypted pages to disk check box.
- Create an HTML file named Test.html, and then paste the following code:
<HTML>
<BODY>
<INPUT type=button onclick=loadmyxml() value="Load XML">
<SCRIPT>
function loadmyxml()
{
var XMLObj = new ActiveXObject("Microsoft.XMLDOM")
XMLObj.async = false;
XMLObj.load('https://localhost/secure/test.xml');
if (XMLObj.parseError.errorCode != 0)
alert("Error loading XML file : " + XMLObj.parseError.reason);
else
alert (XMLObj.xml);
}
</script>
</BODY>
</HTML>
- Save Test.html to a secure folder on your Web server.
- Create a new XML file named Test.xml, and then paste the following code:
<?xml version='1.0' ?>
<BOOKLIST>
<BOOK>
<CATEGORY>Fiction</CATEGORY>
<TITLE>The Snow Leopard</TITLE>
<AUTHOR>Desmond Bagley</AUTHOR>
</BOOK>
</BOOKLIST>
- Save Test.xml to a secure folder on your Web server.
- In Internet Explorer, browse to Test.html, and then click Load XML. You receive error 0x800c0007.
For more information on XML, see the following article on the Microsoft Developer Network (MSDN):
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
APPLIES TO
- Microsoft Internet Explorer 5.0
- Microsoft Internet Explorer 5.01
- Microsoft Internet Explorer (Programming) 5.01 SP1
- Microsoft Internet Explorer 5.5
- Microsoft XML Parser 3.0
- Microsoft XML Parser 3.0 Service Pack 1
- Microsoft XML Core Services 4.0
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate