views:

532

answers:

2

I've got a web-based RSS Reader written in Classic ASP that I've used successfully in public projects past. However, it does not want to cooperate on this in-house project.

Pertinent Code:

set xmlDoc = createObject("Msxml.DOMDocument")
xmlDoc.async = false
xmlDoc.setProperty "ServerHTTPRequest", true
xmlDoc.load(extURL)

If (xmlDoc.parseError.errorCode <> 0) then
    Response.Write "XML error #" & xmlDoc.parseError.errorCode & ": " & xmlDoc.parseError.reason
Else
    'Not pertinent as it never gets here...
End If

I'm getting the following error:

XML error #-2146697208: The download of the specified resource has failed.

It has worked elsewhere fine, just not on this particular project. Its an internal project, so I can't link to it. The feed is properly formed and all that good fun.

No, I can't ditch it and use programming language [insert anti-CLASP rant here]. If that's all you've got to add then don't post.

Its running on Server 2003, and I do have access to the server if I need to look up any configuration information etc.

Edit - To answer a couple of the questions:

  • I've been testing this with extURL being a page on the same server for the time being.
  • I've entered the URL manually into IE6 and IE7 (No Fx per company policy) and it loads fine.
  • I've run the generated RSS feed through a validator from home, and it validates fine.
  • I've saved the generated XML file and tried to load it, only to get the same error.
  • Probably should have mentioned this sooner, but since I couldn't wrangle another server for testing, I'm running the testing site on a different port - http://subdomain.maindomain.com:5150/rss.asp Everything else I've posted still applies.

Last random thought: I do have basic authentication turned on so I can limit access to certain parts of the site based on NT Logon, etc. Would this be the problem? I can't turn it off as that would negate some of the security code...

Thanks guys. :)

Edit Again - Turns out it was the authentication that was causing the problems. Partly because someone further up the food chain changed some of the Group Policies, partly due to my own inexperience with my new role as Server Admin (in addition to being the developer).

A: 

Can you ensure that the external URL is accessible from the server, through a browser or ping? The error states that the download fails, so that's the first thing I'd check.

Chad Birch
Updated the question to reflect the information.
AnonJr
A: 

I'd check the server at this point.

  1. Verify that the content-type it is sending down is text/xml -- you can do this by just loading your extURL variable value in Firefox
  2. Try downloading the file to disk and reworking your code to read the file from disk. Does this work?

Updated after you answered those questions:

I do have basic authentication turned on so I can limit access to certain parts of the site based on NT Logon, etc. Would this be the problem?

Uh, yes! Most definitely. Your ASP script can't type your username and password into the authentication dialog that's running, so it will never be able to download your resource.

BUT you also said you put the xml in a local file and modified the code to load it. If you get the SAME error, then it's absolutely the format of the XML (a bad character, or no root element, or something else weird)... but you said IE opens it fine right?

How about some screenshots?

Michael Pryor
Updated the question to reflect the information.
AnonJr
It was the authentication and some changes done on a more global level. Thanks. :)
AnonJr