Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    108

    Question Unanswered: How can I use ASP to interact with cgi-bin scripts?

    I am using Search engine Studio, which is a cgi script that gives us search results on our intranet.

    The problem is that the cgi script displays the results. I would like ASP to display the results.

    The product help desk says to use their XML wrapper to call the cgi script (via "GET"), and then the XML object can display the results.

    However, XML 3 with sp4 patch does not work. It gives me a bad error: msxml3.dll error '80004005'

    The help desk says that that my ASP version is too old.

    So my only solution: write my own asp wrapper, which will call the cgi-script via "GET", then display the results on the same page.

    How can I do this?

    `Le

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    ASP version is too old? First I've heard of that... make sure your server is up to date on all it's patches.. but aside from that, it could be how you're using the MsxML object. Can you show us your code?
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    108

    Smile

    I'd be happy to!

    Code:
    cgiPath = "/cgi-bin/SearchEngine/root/sessearch.cgi"
    scrName = Request.ServerVariables("URL")
    query = Request.ServerVariables("QUERY_STRING")
    
    Response.Write(cgiPath & "?" & query & "&wrap=" & scrName)
    
    Function PrintSearchCode (url)
    	Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
    	xml.Open "GET", url, False '-- Error happens here
    	xml.Send()
    	Response.write xml.Responsetext
    End Function
    
    if query <> "" then
    	PrintSearchCode (cgiPath & "?" & query & "&wrap=" & scrName)
    end if
    The error happens in the function, at the "xml.Open" call. I have upadated our xml3 with sp 4, but I still get the error. I am not familiar with XML at all I am afraid...

    Basically the function calls the cgi executable script, called "sessearch.cgi". That cgi script returns the webpage results. Normally the .cgi file is called directly from a form Get.

    So as far as I can tell, this asp function calls the cgi file via GET, then the script returns the results back to the xml object. Then the xml object prints those results.

    But the error happens on the xml.open command.

    Any advice would be welcome, thanks.

    ~Le

  4. #4
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Try this:

    Code:
    Function PrintSearchCode (url)
      Set xml = server.CreateObject("msxml2.XMLHTTP")
      xml.open "get", url, false
      xml.send()
      Response.write xml.Responsetext
    End Function
    In our code, the "get" statement is lower case.. not sure if that matters...
    That which does not kill me postpones the inevitable.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    108

    Thumbs down

    same issue
    I get: error '80004005'

    Interesting though, because the before the change the error was: msxml3.dll error '80004005'


    I am still trying different things. More suggestions would be welcome.

    Thanks.

    `Le

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •