locked
msxml3.dll error '80070008' Not enough storage is available to process this command. _index.asp, line 426 RRS feed

  • Question

  • User-1118328576 posted

    I'm hoping someone might be able to shed some light on this problem. I am currently experiencing the above error from a script embedded within my home page that adds content from an RSS feed that I subscribe to. I opted to use an ASP script rather than one of the online offerings because of their unreliability, but I have now started having problems with this script intermittently.

    The script will follow, but before it does, I have tried using "on error resume next" and it tells me there is a problem with the xml at the feed origin, however it will start working correctly just a moment or two later.

    The script is embedded in my home page from line 393 onwards and is as follows:

     Response.Expires = -1
    ' =========== configuration =====================
    ' ##### URL to RSS Feed to display #########
    URLToRSS = "http://nigelsworld.homeip.net/diecast/rssfeed.php"
    ' ##### max number of displayed items #####
    MaxNumberOfItems = 9

    ' ##### Main template constants
    MainTemplateHeader = "<table width='330' border='0'>"
    MainTemplateFooter = "</table>"
    ' #####

    ' ######################################
    Keyword1 = "" ' Keyword1 = "tech" - set non-empty keyword value to filter by this keyword
    Keyword2 = "" ' Keyword1 = "win" - set non-empty keyword value to filter by this 2nd keyword too
    ' #################################

    ' ##### Item template.
    ' ##### {LINK} will be replaced with item link
    ' ##### {TITLE} will be replaced with item title
    ' ##### {DESCRIPTION} will be replaced with item description
    ' ##### {DATE} will be replaced with item date and time
    ' ##### {COMMENTSLINK} will be replaced with link to comments (if you use RSS feed from blog)
    ' ##### {CATEGORY} will be replaced with item category
    ItemTemplate = "<tr><td><font size='2'><strong>{DATE}</strong><br/><strong>{CATEGORY}<br/><font size='2'></strong><a href=" & """{LINK}""" & ">{TITLE}</a><BR>{DESCRIPTION}</font></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.ServerXMLHTTP.3.0")
    xmlHttp.Open "Get", URLToRSS, false
    xmlHttp.Send()
    RSSXML = xmlHttp.ResponseText

    Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
    xmlDOM.async = False
    xmlDOM.validateOnParse = False
    xmlDom.resolveExternals = False

    If not xmlDOM.LoadXml(RSSXML) Then
    ErrorMessage = "Can not load XML:" & vbCRLF & xmlDOM.parseError.reason & vbCRLF & ErrorMessage
    End If

    Set xmlHttp = Nothing ' clear HTTP object

    Set RSSItems = xmlDOM.getElementsByTagName("item") ' collect all "items" from downloaded RSS

    RSSItemsCount = RSSItems.Length-1

    ' if not <item>..</item> entries, then try to get <entry>..</entry>
    if RSSItemsCount = -1 Then
    Set RSSItems = xmlDOM.getElementsByTagName("entry") ' collect all "entry" (atom format) from downloaded RSS
    RSSItemsCount = RSSItems.Length-1

    End If

    Set xmlDOM = Nothing ' clear XML


    ' 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"
    If RSSLink = "" Then
    If child.Attributes.length>0 Then
    RSSLink = child.GetAttribute("href")
    if (RSSLink <> "") Then
    if child.GetAttribute("rel") <> "alternate" Then
    RSSLink = ""
    End If
    End If
    End If ' if has attributes
    If RSSLink = "" Then
    RSSlink = child.text
    End If
    End If
    case "description"
    RSSdescription = child.text
    case "content" ' atom format
    RSSdescription = child.text
    case "published"' atom format
    RSSDate = child.text
    case "pubdate"
    RSSDate = child.text
    case "comments"
    RSSCommentsLink = child.text
    case "category"
    Set CategoryItems = RSSItem.getElementsByTagName("category")
    RSSCategory = ""
    for each categoryitem in CategoryItems
    if RSSCategory <> "" Then
    RSSCategory = RSSCategory & ", "
    End If

    RSSCategory = RSSCategory & categoryitem.text
    Next
    End Select
    next

    ' now check filter
    If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or (InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0) then

    j = J+1

    if J<MaxNumberOfItems then
    ItemContent = Replace(ItemTemplate,"{LINK}",RSSlink)
    ItemContent = Replace(ItemContent,"{TITLE}",RSSTitle)
    ItemContent = Replace(ItemContent,"{DATE}",RSSDate)
    ItemContent = Replace(ItemContent,"{COMMENTSLINK}",RSSCommentsLink)
    ItemContent = Replace(ItemContent,"{CATEGORY}",RSSCategory)

    Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription)
    ItemContent = ""
    RSSLink = ""
    End if
    End If

    Next

    ' writing Footer
    if RSSItemsCount > 0 then
    Response.Write MainTemplateFooter
    else
    Response.Write ErrorMessage
    End If

    'Response.End ' uncomment this for use in on-the-fly output

     

    Any helpful comments would be welcome.

    Friday, November 16, 2007 6:12 PM

All replies

  • User113421904 posted

    Hi,

    If I'm right, the problem occurred at xmlHttp.Open method

    Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
    xmlHttp.Open "Get", URLToRSS, false

    Please check if there is any relevant Event log entry can be found. And try using the following instead.

    Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")


     

    Wednesday, November 21, 2007 9:36 AM