<%@Language=JavaScript EnableSessionState=false%><% //Declare Vars Response.Buffer = false; var obj_FSO; var gs_thisFile = Server.MapPath( 'ass-install.asp' ); var gs_msg = '
The Test Results:
'; var gs_runTests = Request( 'runTests' ); var gs_showConfig = Request( 'showConfig' ); var gs_lastPage = Request( 'lastPage' ); //Vars to help with config var gs_formHelper_webServerRoot = Server.MapPath( '/' ) + '\\'; var gs_formHelper_localPath = String( Request.ServerVariables( 'PATH_TRANSLATED' ) ); gs_formHelper_localPath = gs_formHelper_localPath.substring( 0, gs_formHelper_localPath.lastIndexOf( '\\' ) ) + '\\'; var gs_formHelper_siteHost = Request.ServerVariables( 'HTTP_HOST' ); //The testing functions function testFSOCreation(){ obj_FSO = Server.CreateObject( 'Scripting.FileSystemObject' ); gs_msg += '• Test 1 - File System Object (FSO) Creation Succeeded :)
\r'; return true; } function testFSOFileRead(){ ls_thisPageText = obj_FSO.OpenTextFile( gs_thisFile, 1, false, -2 ); gs_msg += '• Test 2 - FSO File Read Succeeded :)
\r'; return true; } function runTheTest(){ if ( ScriptEngineMajorVersion() >= 3 ){ testFSOCreation(); testFSOFileRead(); gs_msg += '
'; Response.Write( gs_msg ) return true; } else { gs_msg += '• ASPSimpleSearch requires Microsoft JScript Version 3 or above
\r'; gs_msg += 'Your version is: ' + ScriptEngineMajorVersion() + '
'; gs_msg += 'Visit http://msdn.microsoft.com/scripting/ to download the latest Microsoft Script Engine.'; gs_msg += ''; Response.Write( gs_msg ) return false; } } %> ASPSimpleSearch Configuration

ASPSimpleSearch (ASS) Configuration

<%if( ( gs_runTests != 'Next >>' ) && ( gs_showConfig != 'Next >>' ) && ( gs_lastPage != 'Next >>' ) ){%>

Welcome

This page is designed to do two things:

  1. Test your server's ability to run ASS
  2. Create the text for the required configuration file

You will first run two tests by pressing the "Next >>" button. Once you have passed those tests, you will be presented with the configuration screen. The test results will be at the bottom of the next page.

<%}%> <%if ( gs_runTests == 'Next >>' ) {%>

The Test


When you pressed the "Run Tests >>" button, two simple tests were run (see test results below).Those tests were:

  1. Try to create the File System Object (FSO)
  2. Try to read the contents of this configuration file ("ass-install.asp") via the FSO

If these tests pass, you should be able to run ASS on this server (the server that you are viewing this page on) and should continue to the configuration section.

If they fail, the most common problems for the two tests, respectively, are:

  1. If test #1 fails:
    If you see the error "Server.CreateObject Failed," the File System Object is probably not installed. Install it by re-registering the COM component by typing this at the command prompt "regsvr32 scrrun.dll " (minus the quotes). Read about why the FSO component should be disabled at all on Microsoft's IIS4 Security Checklist search for "Disable or remove unneeded COM Components" on that page.
  2. If test #2 fails:
    Basically if test #1 passed, so will test #2. But I like to run it anyway :) If it fails the cause could possibly be incorrect permissions? Read the last paragraph on this 4GuysFromRolla page to learn more about what permissions you need to set.

If either of the tests fail, you will need to fix the problems before you can run ASS.

Begin Tests:


<% if ( runTheTest() ) Response.Write('
'); }%> <%if ( gs_showConfig == 'Next >>' ) {%>

The Configuration


Instructions:

  1. Fill out the form below.
  2. Click the "Create Config" button.
  3. Copy the results and paste them into "ass-preferences.asp".
  4. Place ass-preferences.asp in the same directory as the other search files.
  5. You're finished!

You will find some of the fields autopopulated with common settings. The three settings you need to pay the most attention to are: "ASS Root Directory", "Allowed Hosts", and "Search These Extensions". See below the form for some help on the fields.

* = required.

ASS Root Directory *
The search will begin here and search all sub-directories. It is autopopulated with the current path of this file. If you change it, don't forget the trailing backslash!
Allowed Hosts
This feature scans the HTTP_REFERER of the client and only allows the hosts you list here. Use the format:
'HostCommaHostCommaHost' with no spaces. Do not end with a comma.

Example:
slackoff.org,www.slackoff.org,www2.slackoff.org
Search These Extensions *
The file extensions you want ASS to search. Use the format:
'DotExtensionCommaDotExtensionCommaDotExtension' with no spaces. Do not end with a comma.
Exclude Folders
List the folders as starting from the 'ASS Root Directory' variable entered above, separate each folder path with a single comma. Do not end with a comma. Do not include the trailing backslash in your paths!

Example:
Root Directory is: C:\inetpub\examplecom\
A folder you wish to exclude: C:\inetpub\examplecom\hidden\logfiles\
Another folder you wish to exclude: C:\inetpub\examplecom\private\
So you would enter this: hidden\logfiles,private
Exclude Files
List the files as starting from the 'ASS Root Directory' variable entered above, separate each file path with a single comma. Do not end with a comma.

Example:
Root Directory is: C:\inetpub\examplecom\
A file you wish to exclude: C:\inetpub\examplecom\hidden\passwords.htm
Another file you wish to exclude: C:\inetpub\examplecom\stats.htm
So you would enter this: hidden\passwords.htm,stats.htm

TIP: Often the Exclude Folder feature will make this step unnecessary. Look at that first!

Form Help
Explanations of the preferences form:

Your Configuration File (click "Create Config"):

Copy everything from the "Your Configuration File" box and save it as a file called "ass-preferences.asp". Place that new file in the same directory as the main search files ("ass-engine.asp" and "search.asp") and you are finished! Test out a few searches you know will return a result and see if it worked.

<%}%> <%if ( gs_lastPage == 'Next >>' ) {%>

Delete this file from your server!

Now that you are finished with the setup, you must delete this file ("ass-install.asp") from your server as a security precaution. This script reveals settings about your server that the general public (or nosey not-so-general public) shouldn't know. So remove this file!

Thanks for using ASS!,
blur software

<%}%>