ASP.NET Redirect behind proxy fails, ASP 3.0 works

Discussion in 'ASP General' started by Andy Todd, Aug 27, 2004.

  1. Andy Todd

    Andy Todd Guest

    Hi

    We have just moved an ASP.NET application into the live environment which is
    as follows:

    Sun Proxy Server / Firewall
    Windows 2000 Server / IIS5

    The URL for the site maps to the Sun proxy box. This translates the request
    and maps it to the Win2K server which responds through the proxy. The Win2K
    box has no direct connection to the internet. AFAIK the Win2K box knows
    nothing about the "real" URL being requested.

    We have a problem when issuing a Response.Redirect for a relative path from
    ASP.NET. The code looks like:

    Response.Redirect("home.aspx",false);

    The redirect sends the URL from the Win2K box back to the client with a 302
    status - the client then requests home.aspx, but incorrectly using the URL of
    the Win2K server.

    For example:

    - HTTP Post: http://dev.dfes.gov.uk/progressfile/wideninghorizons/index.aspx
    - index.aspx issues a redirect to home.aspx
    - Browser recieves this as 302 and is given the URL
    http://dev.dfes.gov.uk/0215wideninghorizons/home.aspx
    - Request fails the URL SHOULD be
    http://dev.dfes.gov.uk/progressfile/wideninghorizons/home.aspx

    /0215wideninghorizons/ is the Virtual directory on the Win2K box.

    We could code around this, but as a test I wrote an ASP 3.0 page and an
    ASP.NET page which both issue just one command;
    Response.Redirect("home.aspx");

    When I run both of these the ASP 3 page succeeds and redirects to the
    correct URL. The ASP.NET page however fails. Also a test with
    FormsAuthentication.RedirectFromLoginPage() fails, sending the user to the
    wrong URL.

    We could code around this, but it looks like either a bug in Redirecting in
    ASP.NET, or there's something I don't know about the config which could help.

    Any suggestions greatly appreciated.

    Thanks
    Andy

    --
    Senior Developer - 3T Productions Ltd
    MCP ASP.NET
     
    Andy Todd, Aug 27, 2004
    #1
    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. =?Utf-8?B?QW5keSBUb2Rk?=

    ASP.NET Redirect behind proxy fails, ASP 3 works.

    =?Utf-8?B?QW5keSBUb2Rk?=, Aug 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    861
    =?Utf-8?B?QW5keSBUb2Rk?=
    Aug 27, 2004
  2. vidy5300
    Replies:
    0
    Views:
    885
    vidy5300
    Jun 7, 2004
  3. Sal
    Replies:
    1
    Views:
    796
  4. Kumarforg

    Web Service invocation from behind proxy behind firewall

    Kumarforg, Aug 3, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    197
    Kumarforg
    Aug 3, 2004
  5. Replies:
    0
    Views:
    111
Loading...

Share This Page