Reputation: 1763
<%
set xd= server.createobject("msxml2.domdocument.6.0")
xd.async = false
xd.load("http://example.com/test.xml")
set errorlist= xd.selectnodes("/XMLResponse/ServiceList/")
if errorlist.length <> 0 then
response.write "FILE EXIST"
else
Response.Write xd.parseError.reason
end if
%>
when i run above code i getting error "The download of the specified resource has failed"
How to solve this?
Upvotes: 4
Views: 39401
Reputation: 46
I Updated Windows 7 to Windows 7 SP1 and Internet Explorer 8 to Internet Explorer 11. It solved the issue.
Upvotes: 0
Reputation: 7936
I also faced same issue,
The problem was that because of some other things I was doing from the same box, I had exceeded the allowed limit of the Yahoo geocoding API. Once that was reset - the next day - it worked again as expected.
The error message that the download has "failed" was technically correct but not particularly descriptive. It seems like this is also a failure on Yahoo's API in that I wasn't being told explicitly (in XML) that I had exceeded the limit, it just wasn't returning anything.
Upvotes: 0
Reputation: 456
I had the same problem and figured it was a permissions error (cross-domain maybe?) with accessing an RSS feed from another domain. I was able to pull up the contents of the RSS feed in my browser just fine. I have limited access to the server and it is highly secured, so I figured it was some security setting.
I found that this alternate approach allowed me to work around this:
Set xHttp = CreateObject("MSXML2.XMLHTTP")
xHttp.open "GET", "http://example.com/test.xml", False
xHttp.send
Set xd = Server.CreateObject("Microsoft.XMLDOM")
xd.loadxml(xHttp.responseText)
[rest of your code]
Upvotes: 1
Reputation: 25054
Start by trying to find out whether the URI you are trying to dereference can be dereferenced successfully in other contexts.
For example, try dereferencing it with a browser, or with curl or wget. If you can retrieve the resource with those tools, then your problem lies in the way you are asking ASP to retrieve it, and you need to look at the API documentation to see what you're doing wrong. If you can't retrieve the resource with those tools (curl http://example.com/test.xml
fails for me, for example), then the problem lies on the server side, and you have a different set of possible causes and a different road to solution.
Upvotes: 0