SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot pannick's Avatar
    Join Date
    Aug 2003
    Location
    Florida
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Trying to get .asp script to run.

    Hey gang.
    Very confused here. I had this script running on my site earlier. www.floridasportstalk.com/test.asp I came back after a while ( I made no changes) but now I get this error.

    Microsoft VBScript runtime error '800a01fb'

    An exception occurred: 'xmlHttp.Send'

    /test.asp, line 32

    This is line 32
    xmlHttp.Send()

    I will post the code, any tips will greatly be appreciated.

    Code:
    <%
    
     ' =========== RSS2HTML.ASP for ASP/ASP.NET ==========
     ' copyright 2005 (c) www.Bytescout.com
     ' ===============================================
     
     ' =========== configuration =====================
     ' ##### URL to RSS Feed to display #########
     URLToRSS = "http://rssnewsapps.ziffdavis.com/tech.xml"
     
     ' ##### max number of displayed items #####
     MaxNumberOfItems = 7
     
     ' ##### Main template constants
     MainTemplateHeader = "<table>"
     MainTemplateFooter = "</table>"
     ' ##### 
     
     ' ##### Item template.
     ' ##### {LINK} will be replaced with item link
     ' ##### {TITLE} will be replaced with item title
     ' ##### {DESCRIPTION} will be replaced with item description
     ItemTemplate = "<tr><td><a href=" & """{LINK}""" & ">{TITLE}</a><BR>{DESCRIPTION}</td></tr>"
     
     ' ##### Error message that will be displayed if not items etc
     ErrorMessage = "Error has occured while trying to process " &URLToRSS & "<BR>Please contact web-master"
     
     ' ================================================
     
     Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
     xmlHttp.Open "Get", URLToRSS, false
     xmlHttp.Send()
     RSSXML = xmlHttp.ResponseText
     
     Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
     xmlDOM.async = false
     xmlDOM.LoadXml(RSSXML)
     
     Set xmlHttp = Nothing ' clear HTTP object
     
     Set RSSItems = xmlDOM.getElementsByTagName("item") ' collect all "items" from downloaded RSS
     Set xmlDOM = Nothing ' clear XML
     
     RSSItemsCount = RSSItems.Length-1
     
     ' writing Header
     if RSSItemsCount > 0 then 
      Response.Write MainTemplateHeader
     End If
     
     j = -1
     
     For i = 0 To RSSItemsCount
     Set RSSItem = RSSItems.Item(i)
     
      for each child in RSSItem.childNodes
       Select case lcase(child.nodeName)
         case "title"
               RSStitle = child.text
         case "link"
               RSSlink = child.text
         case "description"
               RSSdescription = child.text
       End Select
      next
     
      j = J+1
     
      if J<MaxNumberOfItems then 
      ItemContent = Replace(ItemTemplate,"{LINK}",RSSlink)
      ItemContent = Replace(ItemContent,"{TITLE}",RSSTitle)
      Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription)
      ItemContent = ""
      End if
     
     Next
     
     ' writing Footer
     if RSSItemsCount > 0 then 
      Response.Write MainTemplateFooter
     else 
      Response.Write ErrorMessage
     End If
     
     ' Response.End ' uncomment this line if you need to finalize output
    %>

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    NY, USA
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would try it with another RSS feeds, that seems to be the one dependant variable here where the script would fail.

  3. #3
    SitePoint Zealot pannick's Avatar
    Join Date
    Aug 2003
    Location
    Florida
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks MrRadic,
    I have tried 4 different feeds already same result.

    I am trying to get these feeds to show up on my website and nothing works.
    http://sports.espn.go.com/espn/rss/news

    http://www.gatorzone.com/rss/

  4. #4
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    NY, USA
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm I tried it both locally on IIS and on our servers. Both times I get a

    msxml3.dll error '80070005'
    Access is denied.
    /test.asp, line 32

    If you google this, it seems to be a common problem, and you must use another solution to RSS.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    Kentucky USA
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    xmlHttp.Send()
    should be...
    xmlHttp.Send

    no brackets

  6. #6
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use
    Server.CreateObject("MSXML2.ServerXMLHTTP")
    instead of
    Server.CreateObject("MSXML2.XMLHTTP.3.0")


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •