473,396 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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/...ons/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/...zons/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
Nov 18 '05 #1
1 2506
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/...ons/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/...zons/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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: D. Nii | last post by:
Hi there, I have a web application that recently got redesigned and now makes use of Response.Redirect . The "new" application is hosted on Win2000 and works for all kinds of clients using IE...
0
by: Andy Todd | last post by:
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...
5
by: Bill Hauver | last post by:
I am attempting to use a web service from my work pc which is behind a firewall. I have used wsdl.exe to create the web service reference class and added it to my project. (this seems to work...
6
by: sameer | last post by:
..NET Framework 1.1 VS2003 Application is making webservice calls from behind a proxy server and then freezes and dies. Questoin is can i use webservice over proxy server( i guess another name...
15
by: KBuser | last post by:
I recently developed an internal website with various queries against our SQL server. I added buttons with Response.Redirect. These buttons do not work with Internet Explorer, however when using...
6
by: Alejandro Dubrovsky | last post by:
I see from googling around that this is a popular topic, but I haven't seen anyone saying "ah, yes, that works", so here it goes. How does one connect through a proxy which requires basic...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
0
by: J Ames | last post by:
Please, if this is the incorrect forum for this question, let me know which forum is most appropriate. I want to make sure I get visibility with the proper gurus! I have a .NET console app that...
6
by: Larry Hale | last post by:
Greetings, Pythonistas! My employer has a Squid Proxy between my Python programs and The Internet. I've searched high-and-low, and can only find examples online of how to do basic...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.