Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Search page not working HTTP Error 405 Helpful Member! 

julesNDC (IS/IT--Management) (OP)
1 Dec 06 7:17
I am trying to get a search page to our intranet to work by using FrontPage.  My problem is when I do a query it gives me the error below.

*******************************************************

The page cannot be displayed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

Please try the following:
•    Contact the Web site administrator if you believe that this request should be allowed.
•    Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
HTTP Error 405 - The HTTP verb used to access this page is not allowed.
Internet Information Services (IIS)
**********************************************************


I have to get this page going as it is affecting the productivity of about 400 users! And please bear with me as I am new to FrontPage and the web stuff.

Thanks
Helpful Member!  xwb (Programmer)
4 Dec 06 0:50
Possibilities

1) IIS has not been set up correctly.  Create a virtual directory under the default website called testsite.  Give it read facilites.  Create a simple webpage called index.htm containing

CODE

<html><head><title>Simple Test</title></head>
<body>It works</body></html>
On the server, pop up IE and in the address bar type

CODE

http://localhost/testsite/index.htm
See if you get anything.  If that works, assuming the server is called MVP try this

CODE

http://MVP/testsite/index.htm
If all that worked, then it isn't your IIS setup

2) Check where the virtual directories/websites are pointing to.  Has your file been downloaded to the real directories?

3) Check the spelling of the filenames.  Also make sure there aren't any spaces in the filename.  Spaces play havoc with the system.

That is all I can think of.  Let us know how you get on.
julesNDC (IS/IT--Management) (OP)
4 Dec 06 10:39
The testsite worked fine.  Now I make sure there aren't any spaces in the filename.

I will let you know.

Thanks
julesNDC (IS/IT--Management) (OP)
4 Dec 06 10:45
Ok,it looks like most of the Word documents do have spaces in the name.  The problem is that they are probably over 200 docs and before I get inot the task of renaming them all, could that really be where the problem is?
julesNDC (IS/IT--Management) (OP)
4 Dec 06 10:57
Also, I created a search page for thetestsite and added a word document to the site.  When I do  search for the document the document does not display.  Below is what the browser shows before and after the search.



http://localhost/testsite/search.htm?search=


http://localhost/testsite/search.htm?search=emailproperusage.doc


Again, I am new to this, maybe I am missing someting obvious
julesNDC (IS/IT--Management) (OP)
4 Dec 06 11:48
ok, found out that I did not have the index service running on the server and got that to work.  Now I am gettigna different error (see below) and the browser shows this:  http://servername/VDetMan/_vti_script/search.htm0.idq


***************************************************

The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
--------------------------------------------------------------------------------

Please try the following:

Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

******************************************************
julesNDC (IS/IT--Management) (OP)
4 Dec 06 12:22
Ok,Here is my latest findings.  Got the search page to work to where it does not give me any erros but does not dispaly any document either.  Below is what the browser shows before and after the search.



http://localhost/testsite/search.htm?search=


http://localhost/testsite/search.htm?search=emailproperusage.doc


Again, I am new to this, maybe I am missing someting obvious
xwb (Programmer)
4 Dec 06 13:56
Presumably search.htm is supposed to execute something and return emailproperusage.doc.

Is search.htm an asp script i.e does it have <% and %> in it?  If it does, it has to have the extension .asp.

If there are spaces in the filename, they have to be substituted with %20.
julesNDC (IS/IT--Management) (OP)
4 Dec 06 14:04
You lost me.

where do I need to look for <% and %>?

I don"t know if search.htm is an ASP scrip.  I created the page using FrontPage (if that anwers your question)
xwb (Programmer)
4 Dec 06 14:12
How are you picking up the search stuff?  What does the code for receiving search=emailproperusage.doc look like?
julesNDC (IS/IT--Management) (OP)
4 Dec 06 14:48
I don't know.

Search htm is a FrontPAge form and when I run it the address bar returns http://servername/VDetMan/Search.htm?search=emailproperusage.doc


emailproperusage.doc being the item searching for.  No other page comes up and/or comments.

thanks again for your help.

xwb (Programmer)
4 Dec 06 15:05
What you basically need is for something to retrieve the document and return it back to you.  First things first.  Try something simple.  We'll just get the server to echo the name of the document.

Create a file called retrieve.asp with the following content

CODE

<%@ language="vbscript" %>
<%
with Response
   .Write "<html><head><title>Document Retrieval</title></head>"
   .Write "<body>You are asking for " & Request("search")
   .Write "</body>
   .Write "</html>"
end with
%>
In your search form, go into html mode and look for the line that begins with <form
Change it so that it looks like

CODE

<form method="post" action="retrieve.asp">
Download both to the server and when you try to get something.doc, it should return with

You are asking for something.doc

See if that works first.  I have to lookup how to return a document.
xwb (Programmer)
4 Dec 06 15:16
If you managed to get that working, replace the code in retrieve.asp with that in this link

http://www.xefteri.com/articles/show.cfm?id=7

That will basically download the file to the client.
julesNDC (IS/IT--Management) (OP)
4 Dec 06 15:21
I could not not find the line  that begins with "<form" in the search page created by FrontPage!!!
xwb (Programmer)
4 Dec 06 15:45
Can you post the html of search.htm
julesNDC (IS/IT--Management) (OP)
4 Dec 06 15:49
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>New Page 2</title>
</head>

<body>

<p>
<!--webbot bot="PurpleText" preview="Text Search - This page lets you search through the default text index that is created whenever web pages are saved or web links are recalculated. No customization is required." --><a name="top">
</a></p>
<hr>
<p>Use the form below to search for documents in this Web site containing
specific words or combinations of words. The text search engine will display a
weighted list of matching documents, with better matches shown first. Each list
item is a link to a matching document; if the document has a title it will be
shown, otherwise only the document's file name is displayed. A brief
<a href="#querylang">explanation</a> of the query language is available, along
with examples.</p>
<!--webbot bot="Search" s-link s-fields="TimeStamp,DocumentK," s-index="All" s-dsn="default" tag="BODY" s-text="Search for:" i-size="20" s-submit="Start Search" s-clear="Reset" --><hr>
<h2><a name="querylang">Query Language</a></h2>
<p>The text search engine allows queries to be formed from arbitrary Boolean
expressions containing the keywords AND, OR, and NOT, and grouped with
parentheses. For example:</p>
<blockquote>
    <dl>
        <dt><strong><tt>information retrieval</tt></strong></dt>
        <dd>finds documents containing 'information' or 'retrieval'<br>
        <br>
        </dd>
        <dt><strong><tt>information or retrieval</tt></strong></dt>
        <dd>same as above<br>
        <br>
        </dd>
        <dt><strong><tt>information and retrieval</tt></strong></dt>
        <dd>finds documents containing both 'information' and 'retrieval'<br>
        <br>
        </dd>
        <dt><strong><tt>information not retrieval</tt></strong></dt>
        <dd>finds documents containing 'information' but not 'retrieval'<br>
        <br>
        </dd>
        <dt><strong><tt>(information not retrieval) and WAIS</tt></strong></dt>
        <dd>finds documents containing 'WAIS', plus 'information' but not
        'retrieval'<br>
        <br>
        </dd>
        <dt><strong><tt>web*</tt></strong></dt>
        <dd>finds documents containing words starting with 'web'<br>
        <br>
        </dd>
    </dl>
</blockquote>
<h5><a href="#top">Back to Top</a></h5>
<hr>
<h5>Author information goes here.<br>
Copyright © 2001 [OrganizationName]. All rights reserved.<br>
Revised: <!--webbot bot="TimeStamp" s-format="%m/%d/%y" s-type="EDITED" -->.</h5>

</body>

</html>
julesNDC (IS/IT--Management) (OP)
4 Dec 06 16:01
FYI, I am using FrontPage 2003.  Don't know if it makes a difference or not.
xwb (Programmer)
4 Dec 06 16:37
The code is generated by FP.  Look for the second line that starts with

CODE

<!--webbot
Remove it and in its place put

CODE

<form method="post" action="retrieve.asp">
<b>Search for:</b><input  type="text" size="20" name="search"><p>
<input type="submit" value="Start Search">
<input type="reset" value="Reset">
</p>
</form>
My original posting for retrieve.asp had a missing quote.  Here is the corrected version

CODE

<%@ language="vbscript" %>
<%
with Response
   .Write "<html><head><title>Document Retrieval</title></head>"
   .Write "<body>You are asking for " & Request("search")
   .Write "</body>"
   .Write "</html>"
end with
%>
[/CODE]
xwb (Programmer)
4 Dec 06 16:48
I don't have FP2003: only FP2000.  You can publish your original page as it stands but your server has to be frontpage enabled and you have to publish the site: not just copy the page you have created.  FP extensions need all the stuff in all the directories it creates.

If you look, search.htm should be in one of them.
xwb (Programmer)
4 Dec 06 22:48
Front page extensions need to be switched on on IIS.  See http://support.microsoft.com/kb/298158

on how to switch them on.
julesNDC (IS/IT--Management) (OP)
5 Dec 06 12:19
Ok, so I replaced <!--webbot with what you sent me and modified the retrive.asp.

Also, the web site is published and FrontPage extensions were on.

Now when I do search for the word "bottle", a page comes up with the text "You are asking for bottle"

Is that what you were looking for to happen?
xwb (Programmer)
5 Dec 06 14:04
Yes.  It is just a check that .asp is working on your server.  Now if you put the <!--web line back, the retrieval should work.

Do you have any documents in the site where you are searching?  Put in a mix of text and word documents and try doing the search.
julesNDC (IS/IT--Management) (OP)
5 Dec 06 14:41
Now I am getting something different when I do a query.


*********************************************************
FrontPage Run-Time Component Page
You have submitted a form or followed a link to a page that requires a web server and the FrontPage Server Extensions to function properly.

This form or other FrontPage component will work correctly if you publish this web to a web server that has the FrontPage Server Extensions installed.

Click the <Back> arrow to return to the previous page.

***********************************************************


So I published the web to the server running FrontPage server extensions and it still not working.  Are we getting close?  By the way, thank you so much for your help.
julesNDC (IS/IT--Management) (OP)
5 Dec 06 15:10
Never mind..... I got it to work!!!!!!!!!

I cannot thank you enough for your help xwb.  THANK YOU
xwb (Programmer)
5 Dec 06 18:46
What did you do to get it to work?
julesNDC (IS/IT--Management) (OP)
6 Dec 06 7:03
I think that publishing the web site is the only part that was missing... but I am not really sure.

When I open from my computer using FrontPage the web site that was located on the server, I saw that all the htm files had all the same icon (IE + FP)but one, the search page only had IE as the icon.  So I published that page and 5 minutes later it was working.  Does that make sense to you?
xwb (Programmer)
6 Dec 06 7:32
yes
julesNDC (IS/IT--Management) (OP)
6 Dec 06 7:34
Well, like I said before, Tahnk you.  You just made 400 users happy and turned me into a hero smile
julesNDC (IS/IT--Management) (OP)
12 Dec 06 9:59
Hey xwb,

Since you are the expert her I have another question for you if you don't mind of course.

The search page is working great but of course it needs some tweaking.  If I do a search for the word “bolt” and the search returns 5 docs.  If I open one of the docs, next time a do a search for “bolts” the previously opened doc will show as purple instead of blue.

Any suggestions?
xwb (Programmer)
24 Dec 06 3:30
Sorry for the late reply - you need to add a style sheet.  Put the following in before </head>

CODE

<style>
a {color:#00f;}
a:visited {color:#00f;}
a:active {color:#00f;}
a:hover {color:#f0f;}
</style>
julesNDC (IS/IT--Management) (OP)
26 Dec 06 6:51
Not a problem and thanks.

Now they had me put all these documents of our website and they want me to have the search work the same way.  I created a search page and a retreive.asp page.  I also did the little test you had me do before where after modifying search page it would display “you are asking for…”  and would display the word searched for and it worked.  But I can’t get the search page to work.  When I do a search for a document it returns the word that I am searching for in the address bar and that’s it.

http://www.website.com/search.htm?search=bolts

Also ( I know, I am full of questions)  I created a password protected page in FrontPage and it works but what I can’t figure out is how to add a check box that will remember the user name and password.

That’s it….. for now smile

Thanks
xwb (Programmer)
2 Jan 07 0:51
Remembering the username and password is normally done with a cookie.

Try renaming search.htm to search.asp and download it again.  It probably needs to execute some asp code to return the data.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close