PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Noobie problems with aspx

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Noobie problems with aspx

    Please excuse me, but I'm getting totally lost.

    I've inserted a search box in the master.master file, so that it appears on all pages in an experimental web http://www.cypenv.info/cyprusee2 (this is a copy of a valid URL, so it doesn't matter if I make a complete hash of it). It addresses http://www.cypenv.info/cyprusee2/search/search.aspx, using a small script downloaded from the Wrensoft website.

    I created the files, using the CGI option, on my local computer and uploaded them to an ad hoc directory http://www.cypenv.info/cyprusee2/search/

    I created a search.aspx page which contains nothing but the C script downloaded from the Wrensoft website and placed it in the .../search/directory.

    When I enter a search word, the screen displays the code of the search.aspx file. Thinking that it may be a path problem, I tried changing the psi.FileName = Server.MapPath("search.cgi") to include the full path, but it reverts to the line shown, despite a change of permissions to 777.

    I have a number of other questions, but let's get the basics working first!

    What have I done wrong? Thanks for your advice.
    Devil

  • #2
    Who knew the Devil lived in Cyprus?

    You've pretty much gone about doing things backwards to be honest. If you refer to this FAQ:
    Q. How do I create an ASP.NET (or ASPX) search page?

    You would note that the first step is to get the CGI working on your server. Since you have not achieved this yet, anything you do with the ASPX page is irrelevant.

    There is detailed information on setting up the CGI on IIS here:
    Q. I need help setting up binary CGI support for my Windows IIS server

    Please refer to that and make sure you've followed all the steps for the necessary IIS version, not just setting the permissions.

    Once you have the CGI working so that this URL actually goes to a working search page:
    http://www.cypenv.info/cyprusee2/search/search.cgi

    ... THEN you can worry about your ASPX page. And speaking of which, there is something definitely wrong with your server configuration if it is showing the source code to "search.aspx" as it is doing now. It has nothing to do with the path, nor file permissions. If it shows the source code, IIS is not treating the file as an ASPX script at all. You need to consult your web host / admin, as to why ASPX files will not work in this folder. You can further prove this by uploading any other ASPX file to the same folder, and it should also show up as source code. Most likely, your server is only setup to provide ASPX support in certain folders, and not others.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Thanks for your help. The problem seems to be essentially the CGI config. I've not been able to follow the instructions as I cannot access the server manager. I've e-mailed the admin, but have not had a reply after nearly 48 h.

      I've tried a php Search page and, although the indexing is good, the results show No title, e.g.:

      Search results for: coal

      10 results found.
      1. No title
      ... ï Coal Depending on the grade, coal is mostly carbon and is therefore a major contributor to greenhouse gas emissions. It is also rich in other major pollutants ...
      Terms matched: 1 - Score: 75 - 21 Aug 2008 - URL: file:///F:/mydocs/My%20Web%20Sites/cyprusE%26E2/search/files/fossilfuel/coal.aspx
      2. No title
      ... the Kyoto Protocol, the USA, China and India also happen to be major coal producers and produce a large proportion of their electricity from coal. As other fossil ...
      Terms matched: 1 - Score: 60 - 9 Aug 2008 - URL: file:///F:/mydocs/My%20Web%20Sites/cyprusE%26E2/search/files/fossilfuel/oil.aspx
      3. No title
      ... to be heated. Analogous reactions can take place with nearly every hydrocarbon, even coal, but most other hydrocarbons have a much higher carbon:hydrogen ratio, so ...
      Terms matched: 1 - Score: 45 - 18 Aug 2008 - URL: file:///F:/mydocs/My%20Web%20Sites/cyprusE%26E2/search/files/hydrogen/hydrogen.aspx
      4. No title
      ... idea of the proponents of this method is to dump the calcium carbonate down disused coal mines or to fill in open cast mining holes. The only problems are that ...
      Terms matched: 1 - Score: 30 - 11 Aug 2008 - URL: file:///F:/mydocs/My%20Web%20Sites/cyprusE%26E2/search/files/climate/sequestration.aspx

      The 'No title's are correctly hyperlinked and all the pages are titled:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

      <head profile="http://www.w3.org/2005/10/profile"><link rel="icon" type="image/png" href="./images/myicon.png" /><meta http-equiv="Content-Language" content="en-gb" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
      Cyprus E&E Home
      </title>

      <link rel="stylesheet" type="text/css" href="master.css" />
      <style type="text/css">

      Is there an explanation for this?
      Devil

      Comment


      • #4
        Switching to the CGI won't effect the display of the titles. Which I think must be becuase either, something wrong on the source HTML pages being indexed or you have turned off indexing of page titles in Zoom.

        Comment


        • #5
          OK, thanks. I've resolved the "No title" problem by spidering the remote site. It is only when creating the data locally that it happens.

          I obviously have not implemented the aspx/CGI implementation yet, but it's kinda sorta working OK, as far as I've tested. I may be implementing it on a real website if all goes well with my final tests, even though the search page is formatted with your html page (modified), rather than from my master.css/master.master.
          Devil

          Comment


          • #6
            Originally posted by devil View Post
            OK, thanks. I've resolved the "No title" problem by spidering the remote site. It is only when creating the data locally that it happens.
            You're indexing dynamically generated ASPX pages. That means they are scripts which are executed on the web server, which then produce the final HTML output you see when you access them from the web server. Given what you tell us, I would bet there are no titles in the actual ASPX files, but they are being generated in ASPX scripting.

            If you index them offline/locally, the ASPX script won't be executed, you'd just be indexing the source code (which Zoom is smart enough to ignore).

            As a general rule of thumb, you should use Spider Mode whenever you need to index a website that contains any PHP, ASP, ASPX, CF or any other dynamically generated web page.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment

            Working...
            X