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

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Andy Todd (AndyTodd_at_discussions.microsoft.com)
Date: 08/27/04


Date: Fri, 27 Aug 2004 07:37:05 -0700

Hi Fernando

We could use Server.Transfer which would solve the problem (apart from the
Forms redirect issue) but what I'd like to know is is this a bug, or is it
working as it should?

I need to know as changing all of our Response.Redirects is obviously going
to cost a lot of money!

Many Thanks
Andy

"Fernando Hunth" wrote:

> Try using Server.Transfer instead Response.Redirect
>
> "Andy Todd" wrote:
>
> > 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



Relevant Pages

  • [Unix/Win] Yet Another Z80 Emulator by AG (final release 2.20.1)
    ... I found an another bug in the code which simulate the CP/M ... --> http://yaze-ag.de/ redirect to ... yaze-ag 'at' Dipl.-Ing.Andreas Gerlich, University of Ulm, Germany ...
    (comp.os.cpm)
  • RE: I cant get Acrobat Reader (i.e. Adobe Reader 9) to run ==> Runtim
    ... in Adobe Reader OR Acrobat if your Application Data directory is redirected ... share a drive latter and redirect to the drive letter, ... Reader/Acrobat v.8.1.2 which does not have this bug. ...
    (microsoft.public.windowsxp.general)
  • Re: XSS on Yahoo Mail
    ... ('binary' encoding is not supported, ... yea there is bug but it seems url doesn't work correctly. ... it will redirect to mail's first page ...
    (Bugtraq)
  • Re: Response.redirect (2.0)
    ... Remove your try/catch block around your redirect. ... Googling this, it looks ... like it might be a bug in the framework... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Weekly Python Patch/Bug Summary
    ... Patch / Bug Summary ... new exit and quit objects ... Python memory allocator: Free memory ... tkinter Dialog fails when more than four buttons are used ...
    (comp.lang.python)