Microsoft Knowledge Base Email Alertz

KBAlertz.com: When you use the

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 281142 - Last Review: January 28, 2004 - Revision: 2.0

PRB: Load Method Fails When Loading XML File Over HTTP

This article was previously published under Q281142

On This Page

SYMPTOMS

When you use the Load method of either the MSXML.DOMDocument or the MSXML2.DOMDocument object to load an XML file over HTTP, the method fails with this error message:
-2146697209 - No data is available for the requested resource.

RESOLUTION

Use the ServerXMLHTTP component (introduced in MSXML 3.0) to load the document. You must use the setProperty method of MSXML2.DOMDocument to set the ServerHTTPRequest property to True. A value of True for the ServerHTTPRequest property indicates that you should use the "server-safe" ServerXMLHTTP component to load the document to the server. ServerXMLHTTP only supports synchronous loading; thus, the async property must be set to False when ServerHTTPRequest is set to True.

MORE INFORMATION

If the Load method points to a file path, the problem does not occur.

In the virtual directory that contains the ASP page that loads the XML file, if anonymous access is allowed, be sure that the account used for anonymous access is a domain account. By default, Microsoft Internet Information Server (IIS) sets this account to a local server account, such as IUSR_MACHINENAME, which may not have sufficient rights to the XML file on the other server.

If the IIS server does not have Microsoft Internet Explorer 5.01 Service Pack 2 (SP1) or later installed, the following result displays when you try to access the ASP page:
error 'ASP 0115'
Unexpected error
/MyVirtualDirectory/MyASPPage.asp
A trappable error occurred in an external object. The script cannot continue running.

Steps To Reproduce Behavior

The following VBScript code causes the error message to occur:
<%Option Explicit%>
<%Response.Buffer = False%>
<html>
<head>
</head>
<body>

<%
Dim oXML, oXMLError, ReturnValue, x
Set oXML = Server.CreateObject("MSXML2.DOMDocument")
oXML.async = False

ReturnValue = oXML.Load("http://myserver/myxmlfile.xml")
Response.write "Result of load method is =" & ReturnValue & "<br>"
If ReturnValue = False Then
	Set oXMLError = oXML.ParseError
	Response.Write "&#xa0;&#xa0;" & oXMLError.ErrorCode & " - " & oXMLError.Reason & "  URL=" & oXMLError.URL & 

"<br>"
	Set oXMLError = Nothing
End If

Response.Write oxml.parseError.reason

For x = 0 to oxml.childNodes.length 
	Response.Write "Node " & x & ".  "
Next 

Set oXML = Nothing
%>
</body>
</html>
				
To set the SetProperty method to True, add the following line to the preceding code, immediately following the line: oXML.async = False:
oxml.setProperty "ServerHTTPRequest", true				
For servers that are running on an intranet, the ServerHTTPRequest property requires you to run the WinHTTP proxy configuration utility, Proxycfg.exe. You cannot configure these settings by means of Control Panel.

Currently, the Proxycfg tool is only available by installing the following service packs or software:
  • Windows Server 2003 (all editions)
  • Windows XP Service Pack 1 (SP1)
  • Windows 2000 Service Pack 3 (SP3) or later
  • Sharepoint Portal Server
For instructions about running the Proxycfg.exe utility, refer to the Readme.txt file included with the download, or the Microsoft XML 3.0 SDK. After you run the Proxycfg.exe tool and update the registry, the previous registry settings cannot be restored.

REFERENCES

Microsoft XML 3.0 Software Development Kit

APPLIES TO
  • Microsoft XML Parser 2.0
  • Microsoft XML Parser 2.5
  • Microsoft XML Parser 2.6
  • Microsoft XML Parser 3.0
  • Microsoft XML Core Services 4.0
Keywords: 
kbprb kbfaq KB281142
       

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

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please