473,757 Members | 10,007 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Redire ct for a relative path from
ASP.NET. The code looks like:

Response.Redire ct("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

/0215wideninghor izons/ 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.Redire ct("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
FormsAuthentica tion.RedirectFr omLoginPage() 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 2533
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.Redire cts is obviously going
to cost a lot of money!

Many Thanks
Andy

"Fernando Hunth" wrote:
Try using Server.Transfer instead Response.Redire ct

"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.Redire ct for a relative path from
ASP.NET. The code looks like:

Response.Redire ct("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

/0215wideninghor izons/ 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.Redire ct("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
FormsAuthentica tion.RedirectFr omLoginPage() 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
4048
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 5.0 + and different operating systems (Win2000, WinXP, WinME, Win98). Functions that use the Response.Redirect no longer work for clients using NT 4.0 SP6a IE 5.5 or IE 6.0.
0
2036
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 proxy box. This translates the request and maps it to the Win2K server which responds through the proxy. The Win2K
5
980
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 without a hitch). Before I use this class, I make the necessary calls to instantiate a WebProxy class and then pass in my credentials to set the WebProxy.Credentials property so I can get through the proxy server.
6
2883
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 of them is ISA ... if i a not wrong), if yes how? Sameer
15
6395
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 Firefox the page works flawless. Does anyone know why this is happening or how to fix it?
6
11677
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 authorisation? The following code, stolen from somewhere, fails with a 407: proxy_handler = urllib2.ProxyHandler({"http" : "http://the.proxy.address:3128"}) proxy_auth_handler = urllib2.ProxyBasicAuthHandler() proxy_auth_handler.add_password("The...
4
11438
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 XMLHTTP object. However, when the page requested through the XML object makes a <%Response.Redirect()%> call, a new session is created each time. Is this a flaw in the XMLHTTP Object? How can I force the session to remain the same after a...
0
2119
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 consumes an external web service. It has passed a userid and password to a web proxy object to pass through our corporate proxy server and has been running fine for weeks. Our operations staff has just changed the proxy server so that it now...
6
4529
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 authentication to connect TO an external Web Server, but not how to go THROUGH a (corporate) Proxy, thus my question here. I've tried all sorts of permutations based on my findings, but (obviously) nothing's working for me. I've come across conflicting
0
9489
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9298
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10072
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9885
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9737
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7286
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.