0
votes

We have an old application developed in classic ASP and today it is generating an error while consuming RSS feed. After through investigating(tried to wrote code in .NET to get detailed error) found its special character, in generated output which is causing trouble. When you run RSS feed in browser and run generated XML from local server, it works fine.

 Error: System error: -2147012866.
 Line:  0
 Text:  

I have no idea how to fix it.

<%
 Dim objXML
 Dim objItemList
 Dim objItem
 Dim I
Set objXML = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
objXML.async = False
I = 0

objXML.setProperty "ServerHTTPSRequest", True
'objXML.Load(Server.MapPath("abcd.xml"))
objXML.Load("http://search.jobs.wa.gov.au/wagov.rss?agencyID=925")
If objXML.parseError.errorCode <> 0 Then
  Response.Write "<pre>" & vbCrLf
  Response.Write "<strong>Error:</strong> " & objXML.parseError.reason
  Response.Write "<strong>Line:</strong>  " & objXML.parseError.line   &    vbCrLf
 Response.Write "<strong>Text:</strong>  " &  Server.HTMLEncode(objXML.parseError.srcText) & vbCrLf
 Response.Write "</pre>" & vbCrLf
End If
%>
2
This page may be of help to you.Paul
try objXML.SetProperty "ServerHTTPRequest", True I've tried it and I get an "Access denied" message, but I'm guessing that isn't the case from your location. Also use Server.CreateObject("MSXML2.FreeThreadedDOMDocument.6.0") to use most recent version of the Microsoft XML processor.John

2 Answers

1
votes

Zam, Even if you correct it from ServerHTTPSRequest to ServerHTTPRequest in SetProperty, still nothing works.

As mentioned in question, it also worked fine when you use saved the XML file(generated from RSS FEED)

Also, if you look into below post, it states that it's all because of encoding="iso-8859-1" which is also the case for above issue.

       http://stackoverflow.com/questions/4332828/vbscript-tries-to-read-rss-feeds-have-issue-of-system-does-not-support-the-speci

but solution provided there causes another error that The connection with the server was terminated abnormally

0
votes

I believe error in objXML.SetProperty "ServerHTTPSRequest", True

Because

Error description: Property name is invalid.