Print Page | Close Window

IIS indexing services search

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8254
Printed Date: 01 April 2026 at 1:14am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: IIS indexing services search
Posted By: mar0364
Subject: IIS indexing services search
Date Posted: 20 December 2003 at 4:08pm

May not be the right place to ask this question. Thought I'd give it a shot. I've gotten the search to work. Im having trouble getting the links to ASP pages to work. Its got something to do with the way I'm reading the server address to the page(i think).

Here is an example
Link to page from browser address bar:
http://rehab_test/estate_mangement.asp - http://rehab_test/estate_mangement.asp

Link to same page from search results:
file://fldoiremrhbfp4/intranet/test/intranet/estate_mangemen t.asp

Here is the code used to read the results to the page.

<%
Dim strSearch

Set rsSearch = Server.CreateObject("ADODB.Recordset")

' create the connection string
strConn = "Provider=MSIDXS; Data Source=Rehab_Test"

' Build our Query: Hide admin page and FPSE pages
strQuery = "(" & strQuery & ")" _
& " AND NOT #filename = *admin*" _
& " AND NOT #path *\_vti_*"


' construct the search string
strSearch = "SELECT DocTitle, Path, FileName, Characterization, Size" & _
" FROM SCOPE ()" & _
" WHERE CONTAINS ('" & Request.Form("txtSearchFor") & "')"

' open the recordset on the search
rsSearch.Open strSearch, strConn

' show what's been searched for
While Not rsSearch.EOF
Response.Write "<SPAN CLASS='document'>" & rsSearch("DocTitle") & "</SPAN><BR>" & _
rsSearch("Characterization") & "<BR>" & _
"<A HREF='" & rsSearch("Path") & "'>" & rsSearch("FileName") & "</A>" & _
" (" & rsSearch("Size") & " bytes)<P>"
rsSearch.MoveNext
Wend
Function PathToVpath(strPath)
Const strWebRoot = "d:\intranet\live\"

Dim strTemp

strTemp = strPath

strTemp = Replace(strTemp, strWebRoot, "\")
strTemp = Replace(strTemp, "\", "/")

PathToVpath = strTemp
End Function

' tidy up
rsSearch.Close
Set rsSearch = Nothing
%>

Thanks for any help you can give.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net