Extra Path Info

Discussion in 'ASP General' started by cdkorzen@gmail.com, Aug 24, 2006.

  1. Guest

    I'm sorry if this is a rehash, but all I see is the same info.

    Here's my debacle:

    I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python, Perl,
    Cmd files... works fine. ASP can't find a file when extra path
    information is added. Is there a switch in ASP or something I can
    change that'll get it to work?

    Thanks!
     
    , Aug 24, 2006
    #1
    1. Advertising

  2. wrote:
    > I'm sorry if this is a rehash, but all I see is the same info.
    >
    > Here's my debacle:
    >
    > I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    > Perl, Cmd files... works fine. ASP can't find a file when extra path
    > information is added. Is there a switch in ASP or something I can
    > change that'll get it to work?
    >
    > Thanks!

    1. What scripting language are you talking about?
    2. I can't understand your pr9oblem. Please provide a simple example to
    illustrate it.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Aug 24, 2006
    #2
    1. Advertising

  3. Guest

    Sorry it's not too clear.

    Here's my issue: I'm using VBScript in ASP, and Python to create a
    CGI.

    Python Code:
    =============================================
    import os

    print "Content-type: text/plain\n"

    print "Path info:", os.environ["PATH_INFO"]
    =============================================

    ASP:
    =============================================
    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <meta name="vs_targetSchema"
    content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    <TITLE>Path Info Test</TITLE>
    </HEAD>
    <body>
    The extra path information is: <%=
    Request.ServerVariables("PATH_INFO") %>
    </body>
    </HTML>
    =============================================


    My issue is, when I call them as:
    http://<my server>/<path>/<filename>
    both scripts return the PATH_INFO as /<path>/<filename>

    When I call them as:
    http://<my server>/<path>/<filename>/<extra>/<path>
    the Python script returns a PATH_INFO of
    /<path>/<filename>/<extra>/<path>
    and the server reports that the ASP file cannot be found.

    I have made sure that in the application settings, "Check to make sure
    this file exists" is disabled.

    So, my question is why do the two scripts react differently to added
    path information? My initial guess was that the Python script calls
    the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    didn't make much sense to me.

    Hope this clarifies my question.

    Bob Barrows [MVP] wrote:
    > wrote:
    > > I'm sorry if this is a rehash, but all I see is the same info.
    > >
    > > Here's my debacle:
    > >
    > > I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    > > Perl, Cmd files... works fine. ASP can't find a file when extra path
    > > information is added. Is there a switch in ASP or something I can
    > > change that'll get it to work?
    > >
    > > Thanks!

    > 1. What scripting language are you talking about?
    > 2. I can't understand your pr9oblem. Please provide a simple example to
    > illustrate it.
    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
     
    , Aug 24, 2006
    #3
  4. ASP has no concept of "extra path info", unless you are talking about
    querystrings. In IIS, the only thing allowed after the file name is a
    list of name/value pairs initiated with a question mark and delimited
    with &'s:

    http://www.myweb.com/path/abc.asp?a=526&b=hello

    This name/value pair list is called a querystring. Is that what you are
    talking about? I'm really not familiar with Python.

    wrote:
    > Sorry it's not too clear.
    >
    > Here's my issue: I'm using VBScript in ASP, and Python to create a
    > CGI.
    >
    > Python Code:
    > =============================================
    > import os
    >
    > print "Content-type: text/plain\n"
    >
    > print "Path info:", os.environ["PATH_INFO"]
    > =============================================
    >
    > ASP:
    > =============================================
    > <%@ Language=VBScript %>
    > <HTML>
    > <HEAD>
    > <meta name="vs_targetSchema"
    > content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    > <TITLE>Path Info Test</TITLE>
    > </HEAD>
    > <body>
    > The extra path information is: <%=
    > Request.ServerVariables("PATH_INFO") %>
    > </body>
    > </HTML>
    > =============================================
    >
    >
    > My issue is, when I call them as:
    > http://<my server>/<path>/<filename>
    > both scripts return the PATH_INFO as /<path>/<filename>
    >
    > When I call them as:
    > http://<my server>/<path>/<filename>/<extra>/<path>
    > the Python script returns a PATH_INFO of
    > /<path>/<filename>/<extra>/<path>
    > and the server reports that the ASP file cannot be found.
    >
    > I have made sure that in the application settings, "Check to make sure
    > this file exists" is disabled.
    >
    > So, my question is why do the two scripts react differently to added
    > path information? My initial guess was that the Python script calls
    > the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    > didn't make much sense to me.
    >
    > Hope this clarifies my question.
    >
    > Bob Barrows [MVP] wrote:
    >> wrote:
    >>> I'm sorry if this is a rehash, but all I see is the same info.
    >>>
    >>> Here's my debacle:
    >>>
    >>> I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    >>> Perl, Cmd files... works fine. ASP can't find a file when extra
    >>> path information is added. Is there a switch in ASP or something I
    >>> can change that'll get it to work?
    >>>
    >>> Thanks!

    >> 1. What scripting language are you talking about?
    >> 2. I can't understand your pr9oblem. Please provide a simple example
    >> to illustrate it.
    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Aug 24, 2006
    #4
  5. PS. You can find the ASP scripting documentation here:
    http://msdn.microsoft.com/library/en-us/iissdk/html/2c40c3cf-90eb-41ca-ae2a-0ef33a651779.asp

    Click around in the TOC to find the IIS docs

    wrote:
    > Sorry it's not too clear.
    >
    > Here's my issue: I'm using VBScript in ASP, and Python to create a
    > CGI.
    >
    > Python Code:
    > =============================================
    > import os
    >
    > print "Content-type: text/plain\n"
    >
    > print "Path info:", os.environ["PATH_INFO"]
    > =============================================
    >
    > ASP:
    > =============================================
    > <%@ Language=VBScript %>
    > <HTML>
    > <HEAD>
    > <meta name="vs_targetSchema"
    > content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    > <TITLE>Path Info Test</TITLE>
    > </HEAD>
    > <body>
    > The extra path information is: <%=
    > Request.ServerVariables("PATH_INFO") %>
    > </body>
    > </HTML>
    > =============================================
    >
    >
    > My issue is, when I call them as:
    > http://<my server>/<path>/<filename>
    > both scripts return the PATH_INFO as /<path>/<filename>
    >
    > When I call them as:
    > http://<my server>/<path>/<filename>/<extra>/<path>
    > the Python script returns a PATH_INFO of
    > /<path>/<filename>/<extra>/<path>
    > and the server reports that the ASP file cannot be found.
    >
    > I have made sure that in the application settings, "Check to make sure
    > this file exists" is disabled.
    >
    > So, my question is why do the two scripts react differently to added
    > path information? My initial guess was that the Python script calls
    > the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    > didn't make much sense to me.
    >
    > Hope this clarifies my question.
    >
    > Bob Barrows [MVP] wrote:
    >> wrote:
    >>> I'm sorry if this is a rehash, but all I see is the same info.
    >>>
    >>> Here's my debacle:
    >>>
    >>> I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    >>> Perl, Cmd files... works fine. ASP can't find a file when extra
    >>> path information is added. Is there a switch in ASP or something I
    >>> can change that'll get it to work?
    >>>
    >>> Thanks!

    >> 1. What scripting language are you talking about?
    >> 2. I can't understand your pr9oblem. Please provide a simple example
    >> to illustrate it.
    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Aug 24, 2006
    #5
  6. Slim Guest

    <> wrote in message
    news:...
    > Sorry it's not too clear.
    >
    > Here's my issue: I'm using VBScript in ASP, and Python to create a
    > CGI.
    >
    > Python Code:
    > =============================================
    > import os
    >
    > print "Content-type: text/plain\n"
    >
    > print "Path info:", os.environ["PATH_INFO"]
    > =============================================
    >
    > ASP:
    > =============================================
    > <%@ Language=VBScript %>
    > <HTML>
    > <HEAD>
    > <meta name="vs_targetSchema"
    > content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    > <TITLE>Path Info Test</TITLE>
    > </HEAD>
    > <body>
    > The extra path information is: <%=
    > Request.ServerVariables("PATH_INFO") %>
    > </body>
    > </HTML>
    > =============================================
    >
    >
    > My issue is, when I call them as:
    > http://<my server>/<path>/<filename>
    > both scripts return the PATH_INFO as /<path>/<filename>
    >
    > When I call them as:
    > http://<my server>/<path>/<filename>/<extra>/<path>
    > the Python script returns a PATH_INFO of
    > /<path>/<filename>/<extra>/<path>
    > and the server reports that the ASP file cannot be found.
    >
    > I have made sure that in the application settings, "Check to make sure
    > this file exists" is disabled.
    >
    > So, my question is why do the two scripts react differently to added
    > path information? My initial guess was that the Python script calls
    > the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    > didn't make much sense to me.
    >
    > Hope this clarifies my question.
    >


    nope, still dont know what you mean. But

    maybe this line may clear things up

    <%= Server.MapPath( Request.ServerVariables("PATH_INFO")) & "?" &
    Request.ServerVariables("QUERY_STRING") %>


    or this one

    http:// <%=Request.ServerVariables("LOCAL_ADDR") &
    Request.ServerVariables("URL") & "?" &
    Request.ServerVariables("QUERY_STRING") %>



    > Bob Barrows [MVP] wrote:
    >> wrote:
    >> > I'm sorry if this is a rehash, but all I see is the same info.
    >> >
    >> > Here's my debacle:
    >> >
    >> > I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    >> > Perl, Cmd files... works fine. ASP can't find a file when extra path
    >> > information is added. Is there a switch in ASP or something I can
    >> > change that'll get it to work?
    >> >
    >> > Thanks!

    >> 1. What scripting language are you talking about?
    >> 2. I can't understand your pr9oblem. Please provide a simple example to
    >> illustrate it.
    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get a
    >> quicker response by posting to the newsgroup.

    >
     
    Slim, Aug 24, 2006
    #6
  7. Guest

    I take issue with your assertion that in IIS, the only thing allowed
    after the filename is the query string. It definitely will allow such
    data, as evidenced by the Python code. Also, look for servers that use
    it, as an example:

    http://<someserver>/news/data.dll/articles/1304?printview=true

    I don't know if something exactly like that exists, but I've seen
    similar... the extra path information is used to make the site
    search-engine friendly, since search engines usually ignore query
    strings.

    The Python code is acting similar to a CGI, and in the Application
    settings I have the set up the mapping, so that the Python interpreter
    is called and acts similar to a CGI program, as far as I understand.

    All the Python code does is print out the "PATH_INFO" environment
    variable. It's
    Bob Barrows [MVP] wrote:
    > ASP has no concept of "extra path info", unless you are talking about
    > querystrings. In IIS, the only thing allowed after the file name is a
    > list of name/value pairs initiated with a question mark and delimited
    > with &'s:
    >
    > http://www.myweb.com/path/abc.asp?a=526&b=hello
    >
    > This name/value pair list is called a querystring. Is that what you are
    > talking about? I'm really not familiar with Python.
    >
    > wrote:
    > > Sorry it's not too clear.
    > >
    > > Here's my issue: I'm using VBScript in ASP, and Python to create a
    > > CGI.
    > >
    > > Python Code:
    > > =============================================
    > > import os
    > >
    > > print "Content-type: text/plain\n"
    > >
    > > print "Path info:", os.environ["PATH_INFO"]
    > > =============================================
    > >
    > > ASP:
    > > =============================================
    > > <%@ Language=VBScript %>
    > > <HTML>
    > > <HEAD>
    > > <meta name="vs_targetSchema"
    > > content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    > > <TITLE>Path Info Test</TITLE>
    > > </HEAD>
    > > <body>
    > > The extra path information is: <%=
    > > Request.ServerVariables("PATH_INFO") %>
    > > </body>
    > > </HTML>
    > > =============================================
    > >
    > >
    > > My issue is, when I call them as:
    > > http://<my server>/<path>/<filename>
    > > both scripts return the PATH_INFO as /<path>/<filename>
    > >
    > > When I call them as:
    > > http://<my server>/<path>/<filename>/<extra>/<path>
    > > the Python script returns a PATH_INFO of
    > > /<path>/<filename>/<extra>/<path>
    > > and the server reports that the ASP file cannot be found.
    > >
    > > I have made sure that in the application settings, "Check to make sure
    > > this file exists" is disabled.
    > >
    > > So, my question is why do the two scripts react differently to added
    > > path information? My initial guess was that the Python script calls
    > > the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    > > didn't make much sense to me.
    > >
    > > Hope this clarifies my question.
    > >
    > > Bob Barrows [MVP] wrote:
    > >> wrote:
    > >>> I'm sorry if this is a rehash, but all I see is the same info.
    > >>>
    > >>> Here's my debacle:
    > >>>
    > >>> I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    > >>> Perl, Cmd files... works fine. ASP can't find a file when extra
    > >>> path information is added. Is there a switch in ASP or something I
    > >>> can change that'll get it to work?
    > >>>
    > >>> Thanks!
    > >> 1. What scripting language are you talking about?
    > >> 2. I can't understand your pr9oblem. Please provide a simple example
    > >> to illustrate it.
    > >>
    > >> --
    > >> Microsoft MVP -- ASP/ASP.NET
    > >> Please reply to the newsgroup. The email account listed in my From
    > >> header is my spam trap, so I don't check it very often. You will get
    > >> a quicker response by posting to the newsgroup.

    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
     
    , Aug 24, 2006
    #7
  8. Ah! I did not realize you were talking about browsing to a dll (note
    that I used a .asp file in my example)!

    Someone else will need to step in on this. I have no experience in this
    area.

    wrote:
    > I take issue with your assertion that in IIS, the only thing allowed
    > after the filename is the query string. It definitely will allow such
    > data, as evidenced by the Python code. Also, look for servers that
    > use it, as an example:
    >
    > http://<someserver>/news/data.dll/articles/1304?printview=true
    >
    > I don't know if something exactly like that exists, but I've seen
    > similar... the extra path information is used to make the site
    > search-engine friendly, since search engines usually ignore query
    > strings.
    >
    > The Python code is acting similar to a CGI, and in the Application
    > settings I have the set up the mapping, so that the Python interpreter
    > is called and acts similar to a CGI program, as far as I understand.
    >
    > All the Python code does is print out the "PATH_INFO" environment
    > variable. It's
    > Bob Barrows [MVP] wrote:
    >> ASP has no concept of "extra path info", unless you are talking about
    >> querystrings. In IIS, the only thing allowed after the file name is a
    >> list of name/value pairs initiated with a question mark and delimited
    >> with &'s:
    >>
    >> http://www.myweb.com/path/abc.asp?a=526&b=hello
    >>
    >> This name/value pair list is called a querystring. Is that what you
    >> are talking about? I'm really not familiar with Python.
    >>
    >> wrote:
    >>> Sorry it's not too clear.
    >>>
    >>> Here's my issue: I'm using VBScript in ASP, and Python to create a
    >>> CGI.
    >>>
    >>> Python Code:
    >>> =============================================
    >>> import os
    >>>
    >>> print "Content-type: text/plain\n"
    >>>
    >>> print "Path info:", os.environ["PATH_INFO"]
    >>> =============================================
    >>>
    >>> ASP:
    >>> =============================================
    >>> <%@ Language=VBScript %>
    >>> <HTML>
    >>> <HEAD>
    >>> <meta name="vs_targetSchema"
    >>> content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    >>> <TITLE>Path Info Test</TITLE>
    >>> </HEAD>
    >>> <body>
    >>> The extra path information is: <%=
    >>> Request.ServerVariables("PATH_INFO") %>
    >>> </body>
    >>> </HTML>
    >>> =============================================
    >>>
    >>>
    >>> My issue is, when I call them as:
    >>> http://<my server>/<path>/<filename>
    >>> both scripts return the PATH_INFO as /<path>/<filename>
    >>>
    >>> When I call them as:
    >>> http://<my server>/<path>/<filename>/<extra>/<path>
    >>> the Python script returns a PATH_INFO of
    >>> /<path>/<filename>/<extra>/<path>
    >>> and the server reports that the ASP file cannot be found.
    >>>
    >>> I have made sure that in the application settings, "Check to make
    >>> sure this file exists" is disabled.
    >>>
    >>> So, my question is why do the two scripts react differently to added
    >>> path information? My initial guess was that the Python script calls
    >>> the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    >>> didn't make much sense to me.
    >>>
    >>> Hope this clarifies my question.
    >>>
    >>> Bob Barrows [MVP] wrote:
    >>>> wrote:
    >>>>> I'm sorry if this is a rehash, but all I see is the same info.
    >>>>>
    >>>>> Here's my debacle:
    >>>>>
    >>>>> I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    >>>>> Perl, Cmd files... works fine. ASP can't find a file when extra
    >>>>> path information is added. Is there a switch in ASP or something
    >>>>> I can change that'll get it to work?
    >>>>>
    >>>>> Thanks!
    >>>> 1. What scripting language are you talking about?
    >>>> 2. I can't understand your pr9oblem. Please provide a simple
    >>>> example to illustrate it.
    >>>>
    >>>> --
    >>>> Microsoft MVP -- ASP/ASP.NET
    >>>> Please reply to the newsgroup. The email account listed in my From
    >>>> header is my spam trap, so I don't check it very often. You will
    >>>> get a quicker response by posting to the newsgroup.

    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Aug 24, 2006
    #8
  9. Guest

    Let me make it even more clear:

    Create an ASP.NET web application with C#

    Add a label to the page

    Add this code to the Page_Load event:
    ==================================
    Label1.Text = Request.PathInfo;
    ==================================

    Now, browse to the page like normal. Nothing appears.

    Go to the page, but after typing the name of the page /<filename>.aspx,
    type in /test so it looks like /<filename>.aspx/test

    The label will say /test

    THAT is the effect I'm trying to achieve, but with ASP. I'm hoping to
    do a prototype with ASP to get the UI and an idea of the flow, then
    move to something like CGI, ASP.NET or ISAPI.


    wrote:
    > I take issue with your assertion that in IIS, the only thing allowed
    > after the filename is the query string. It definitely will allow such
    > data, as evidenced by the Python code. Also, look for servers that use
    > it, as an example:
    >
    > http://<someserver>/news/data.dll/articles/1304?printview=true
    >
    > I don't know if something exactly like that exists, but I've seen
    > similar... the extra path information is used to make the site
    > search-engine friendly, since search engines usually ignore query
    > strings.
    >
    > The Python code is acting similar to a CGI, and in the Application
    > settings I have the set up the mapping, so that the Python interpreter
    > is called and acts similar to a CGI program, as far as I understand.
    >
    > All the Python code does is print out the "PATH_INFO" environment
    > variable. It's
    > Bob Barrows [MVP] wrote:
    > > ASP has no concept of "extra path info", unless you are talking about
    > > querystrings. In IIS, the only thing allowed after the file name is a
    > > list of name/value pairs initiated with a question mark and delimited
    > > with &'s:
    > >
    > > http://www.myweb.com/path/abc.asp?a=526&b=hello
    > >
    > > This name/value pair list is called a querystring. Is that what you are
    > > talking about? I'm really not familiar with Python.
    > >
    > > wrote:
    > > > Sorry it's not too clear.
    > > >
    > > > Here's my issue: I'm using VBScript in ASP, and Python to create a
    > > > CGI.
    > > >
    > > > Python Code:
    > > > =============================================
    > > > import os
    > > >
    > > > print "Content-type: text/plain\n"
    > > >
    > > > print "Path info:", os.environ["PATH_INFO"]
    > > > =============================================
    > > >
    > > > ASP:
    > > > =============================================
    > > > <%@ Language=VBScript %>
    > > > <HTML>
    > > > <HEAD>
    > > > <meta name="vs_targetSchema"
    > > > content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    > > > <TITLE>Path Info Test</TITLE>
    > > > </HEAD>
    > > > <body>
    > > > The extra path information is: <%=
    > > > Request.ServerVariables("PATH_INFO") %>
    > > > </body>
    > > > </HTML>
    > > > =============================================
    > > >
    > > >
    > > > My issue is, when I call them as:
    > > > http://<my server>/<path>/<filename>
    > > > both scripts return the PATH_INFO as /<path>/<filename>
    > > >
    > > > When I call them as:
    > > > http://<my server>/<path>/<filename>/<extra>/<path>
    > > > the Python script returns a PATH_INFO of
    > > > /<path>/<filename>/<extra>/<path>
    > > > and the server reports that the ASP file cannot be found.
    > > >
    > > > I have made sure that in the application settings, "Check to make sure
    > > > this file exists" is disabled.
    > > >
    > > > So, my question is why do the two scripts react differently to added
    > > > path information? My initial guess was that the Python script calls
    > > > the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    > > > didn't make much sense to me.
    > > >
    > > > Hope this clarifies my question.
    > > >
    > > > Bob Barrows [MVP] wrote:
    > > >> wrote:
    > > >>> I'm sorry if this is a rehash, but all I see is the same info.
    > > >>>
    > > >>> Here's my debacle:
    > > >>>
    > > >>> I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    > > >>> Perl, Cmd files... works fine. ASP can't find a file when extra
    > > >>> path information is added. Is there a switch in ASP or something I
    > > >>> can change that'll get it to work?
    > > >>>
    > > >>> Thanks!
    > > >> 1. What scripting language are you talking about?
    > > >> 2. I can't understand your pr9oblem. Please provide a simple example
    > > >> to illustrate it.
    > > >>
    > > >> --
    > > >> Microsoft MVP -- ASP/ASP.NET
    > > >> Please reply to the newsgroup. The email account listed in my From
    > > >> header is my spam trap, so I don't check it very often. You will get
    > > >> a quicker response by posting to the newsgroup.

    > >
    > > --
    > > Microsoft MVP -- ASP/ASP.NET
    > > Please reply to the newsgroup. The email account listed in my From
    > > header is my spam trap, so I don't check it very often. You will get a
    > > quicker response by posting to the newsgroup.
     
    , Aug 24, 2006
    #9
  10. wrote:
    > Let me make it even more clear:
    >
    > Create an ASP.NET web application with C#
    >
    > Add a label to the page
    >
    > Add this code to the Page_Load event:
    > ==================================
    > Label1.Text = Request.PathInfo;
    > ==================================
    >
    > Now, browse to the page like normal. Nothing appears.
    >
    > Go to the page, but after typing the name of the page
    > /<filename>.aspx, type in /test so it looks like /<filename>.aspx/test
    >
    > The label will say /test
    >
    > THAT is the effect I'm trying to achieve, but with ASP. I'm hoping to
    > do a prototype with ASP to get the UI and an idea of the flow, then
    > move to something like CGI, ASP.NET or ISAPI.
    >

    I know of no way to accomplish what you are after using a .asp file.
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Aug 24, 2006
    #10
  11. Guest

    Okay thanks. That was what I was going after.


    Bob Barrows [MVP] wrote:
    > wrote:
    > > Let me make it even more clear:
    > >
    > > Create an ASP.NET web application with C#
    > >
    > > Add a label to the page
    > >
    > > Add this code to the Page_Load event:
    > > ==================================
    > > Label1.Text = Request.PathInfo;
    > > ==================================
    > >
    > > Now, browse to the page like normal. Nothing appears.
    > >
    > > Go to the page, but after typing the name of the page
    > > /<filename>.aspx, type in /test so it looks like /<filename>.aspx/test
    > >
    > > The label will say /test
    > >
    > > THAT is the effect I'm trying to achieve, but with ASP. I'm hoping to
    > > do a prototype with ASP to get the UI and an idea of the flow, then
    > > move to something like CGI, ASP.NET or ISAPI.
    > >

    > I know of no way to accomplish what you are after using a .asp file.
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
     
    , Aug 25, 2006
    #11
  12. <> wrote in message
    news:...
    > Sorry it's not too clear.
    >
    > Here's my issue: I'm using VBScript in ASP, and Python to create a
    > CGI.
    >
    > Python Code:
    > =============================================
    > import os
    >
    > print "Content-type: text/plain\n"
    >
    > print "Path info:", os.environ["PATH_INFO"]
    > =============================================
    >
    > ASP:
    > =============================================
    > <%@ Language=VBScript %>
    > <HTML>
    > <HEAD>
    > <meta name="vs_targetSchema"
    > content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    > <TITLE>Path Info Test</TITLE>
    > </HEAD>
    > <body>
    > The extra path information is: <%=
    > Request.ServerVariables("PATH_INFO") %>
    > </body>
    > </HTML>
    > =============================================
    >
    >
    > My issue is, when I call them as:
    > http://<my server>/<path>/<filename>
    > both scripts return the PATH_INFO as /<path>/<filename>
    >
    > When I call them as:
    > http://<my server>/<path>/<filename>/<extra>/<path>
    > the Python script returns a PATH_INFO of
    > /<path>/<filename>/<extra>/<path>
    > and the server reports that the ASP file cannot be found.
    >
    > I have made sure that in the application settings, "Check to make sure
    > this file exists" is disabled.
    >
    > So, my question is why do the two scripts react differently to added
    > path information? My initial guess was that the Python script calls
    > the EXE and runs like a CGI but the ASP runs as an ISAPI, but that
    > didn't make much sense to me.
    >
    > Hope this clarifies my question.
    >


    A clunky way to do this is to make the page the 404 custom error handler for
    itself.
    However the extra info would need to be found from the QUERY_STRING server
    variable instead. One problem might be that relative paths won't work well
    like this.

    A slightly less clunky way is to drop the .asp from filename and make a
    folder with the filename. Now add the file as a custom 404 handler for that
    folder. The URL paths are preserved from the browsers point of view so
    relative paths will work. You still need to parse out of the QUERY_STRING
    the info you need.



    > Bob Barrows [MVP] wrote:
    > > wrote:
    > > > I'm sorry if this is a rehash, but all I see is the same info.
    > > >
    > > > Here's my debacle:
    > > >
    > > > I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python,
    > > > Perl, Cmd files... works fine. ASP can't find a file when extra path
    > > > information is added. Is there a switch in ASP or something I can
    > > > change that'll get it to work?
    > > >
    > > > Thanks!

    > > 1. What scripting language are you talking about?
    > > 2. I can't understand your pr9oblem. Please provide a simple example to
    > > illustrate it.
    > >
    > > --
    > > Microsoft MVP -- ASP/ASP.NET
    > > Please reply to the newsgroup. The email account listed in my From
    > > header is my spam trap, so I don't check it very often. You will get a
    > > quicker response by posting to the newsgroup.

    >
     
    Anthony Jones, Aug 29, 2006
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Invalidlastname

    pass extra info to error page

    Invalidlastname, Aug 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    387
    Alvin Bruney
    Aug 24, 2003
  2. Mupota Muchelemba
    Replies:
    1
    Views:
    916
    Tony Morris
    Feb 4, 2004
  3. harryos
    Replies:
    3
    Views:
    1,220
    harryos
    Dec 15, 2008
  4. mathieu
    Replies:
    3
    Views:
    598
    Bo Persson
    Sep 4, 2009
  5. PW
    Replies:
    3
    Views:
    133
Loading...

Share This Page