Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007

    Unanswered: ASP method to check broken links


    Does anybody know a way to check for broken links within ASP?
    I want to be able to check web links across various servers.

    I have used this code below and it works fine if the url is within the original domain that the code is run - however if I try another random website it will fail with

    msxml3.dll error '800c0005'

    The system cannot locate the resource specified.

    /pages/links.asp, line 44

    Function URLStatus(strURL)
    Dim objXMLHTTP, strReturnStatus
    Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
    'Set oXMLHttp=Server.CreateObject("MSXML2.XMLHTTP")

    objXMLHTTP.Open "GET", "", False
    strReturnStatus = objXMLHTTP.Status
    Set objXMLHTTP = Nothing
    URLStatus = strReturnStatus
    End Function

    Dim strfrmURL
    strfrmURL = CStr("OK")
    If strfrmURL <> "" Then
    If URLStatus(strfrmURL) = "200" Then
    Response.Write "Link is working."
    Response.Write "Link is not working: " & URLStatus(strfrmURL)
    End If
    End If

  2. #2
    Join Date
    Sep 2006
    The products I use and recommend is:


    It works locally in pre-production or intranets and on your public website.

    I have about 32,000 pages.

    Locally takes about an hour on the website it can take 4 hours.


Posting Permissions

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