ASP search errors

Hello,

This is, by far, no my field, but the situation forces me to troubleshoot this, but I am basically lost about this...

A website is being moved from one windows-based hosting to a *nix-based hosting, the website has 2 custom search "engines", one searched into an MS Access .mdb file, but I converted that to Mysql and adjusted the search code and it works fine.

Now, the other search engine is coded in ASP and it searches into other .asp files (not into a database, and the files are actually html with .asp extension)

When I run that second search I get this error:

> The page cannot be displayed

> There is a problem with the page you are trying to reach and it cannot be displayed.

>

> Please try the following:

>

>* Click the Refresh button, or try again later.

>* Open the home page, and then look for links to the information you want.

>

> HTTP 500.100 - Internal Server Error - ASP error

> Apache/1.3.37 (Unix) Sun-ONE-ASP/4.0.2 mod_fastcgi/2.4.2 DAV/1.0.3 mod_perl/1.29 mod_layout/3.2.1 mod_ssl/2.8.28 OpenSSL/0.9.7e

>

> Technical Information (for support personnel)

>

>* Error Type:

>Sun ONE ASP VBScript runtime (0x8007001F)

>System message, messageid = 0x0000001f

>/congresos.org/buscador_interno.asp, line 203

>

>* Browser Type:

>Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9

>

>* Page:

>POST 53 bytes to /congresos.org/buscador_interno.asp

>

>* POST Data:

>SearchText=aa&rLength=200&rResults=50&Submit22=Buscar

>

>* Time:

>Saturday, February 03, 2007, 12:37:37 AM

>

>* More information:

>Sun ONE Active Server Pages Support

Line 203 is

>

> For Each objFile in objFolder.Files

>

And the whole code block is this (not the onle asp code in the file tho)

> <% end if

>

>Set objTextStream = Nothing

>Set objFolder = Nothing

>Set objFSO = Nothing

>

>Sub schSubFol(objFolder)

> For Each objFile in objFolder.Files << LINE 203.

>

>If Count + 1 > reqNumber or strText = "" Then Exit Sub

>

>If Response.IsClientConnected Then

>'Abrir solo si es archivo conocido

>strext = right(objFile.Name,3)

>

>if instr(1,strFile,strext) > 0 then

>Set objTextStream = objFSO.OpenTextFile(objFile.Path,fsoForReading)

>on error resume next

>strContent = objTextStream.ReadAll

>

>If InStr(1,lcase(strContent),lcase(strtext)) > 0 Then

>postitle = InStr(1, strContent, lcase("<TITLE>"),1)

>

>If postitle > 0 Then

>strTitle = Mid(strContent, postitle + 7, InStr(1, strContent, "</TITLE>", 1) - (postitle + 7))

>Else

>strTitle = "Sin Titulo"

>end if

>

>

>if strTitle<>"Sin Titulo" then

>Count = Count + 1

>

>Response.Write "<DL><DT><B><I>"& Count &"</I></B> - > <A HREF=" & replace(Obt_Url(objFile.path)," ","%20") & ">" & strTitle & "</A></DT><BR><DD>"

>

>strTitleL = InStr(1, strContent, "</TITLE>", 1) - InStr(1, strContent, "<TITLE>", 1) + 7

>strDeTag = ""

>bolTagFound = False

>Do While InStr(strContent, "<")

>bolTagFound = True

>strDeTag = strDeTag & " " & Left(strContent, InStr(strContent, "<") - 1)

>strContent = MID(strContent, InStr(strContent, ">") + 1)

>Loop

>

>strDeTag = strDeTag & strContent

>If Not bolTagFound Then strDeTag = strContent

>If reqLength = "0" Then

>Response.Write obt_url(objFile.Path) & "</DD></DL>"

>Else

>Response.Write Mid(strDeTag, strTitleL, reqLength) & "...<BR><I><FONT SIZE='2'>URL: " & obt_url(objFile.Path) & " - > Ultima modificaci髇: " & objFile.DateLastModified & " - " & FormatNumber(objFile.Size / 1024) & "Kbytes</FONT></I></DD></DL>"

>end if

>bolFileFound = True

>End If

>objTextStream.Close

>

>end if

>End If

>End If

>Next

>End Sub

>

>

>Function Obt_Url (nompath)

>obt_url = replace(CurUrl +"/"+ right(nompath,len(nompath) - len(curpath)-1),"\","/")

>end function

>%>

><% end if %>

(I can post the code with code tags, but it gets too wide and off screen, it seemed unconvenient)

THANKS IN ADVANCE!

[5080 byte] By [siko9a] at [2007-11-26 17:10:26]
# 1

My guess is that objFolder is invalid.

Need the code that sets this to be able to see why. I'm guessing it will be something to do with mappath, there are subtle differences in the way it works on windows/linux.

Also you could be attempting to search out of the current web directory and this by default is disabled on sun one asp for security reasons however it can be enabled via the admin console.

I guess it could also be a permissions thing on the folder being searched.

Regards

Duncan

Duncan_Berrimana at 2007-7-8 23:38:16 > top of Java-index,Web & Directory Servers,Web Servers...