473,466 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Redirects

I have a web app that works fine on the development machine and on several
servers running Win2k IIS 5 and Windows2003 IIS 6. But I am having an issue
on one particular erver running Win2k IIS 5, but has an Apache server
sending redirects to this server.

My problem is when I try to do a

Response.Redirect ("~/somepage.aspx")

The page calling the Response.Rediect is in the same directory as the
somepage.aspx, but I get 404 Page Not Found Error. This happens everytime.
The test app I was working with was as simple as having two web forms, and
in the page load of the first have the redirct to the other.

Another piece of info that may be of relevance is that the web app is
running on port 90 because the Apache runs on 80. The Apache configuration
file looks something like

Proxypass /dw/ http://machine.company.location.md.us:90/
ProxyPassreverse /dw/ http://machine.company.location.md.us:90/

So www.mainsite.com/dw/ would redirect to my server using port 90.

Also the application runs fine if ran from the server itself. I only have
the problem when accessing the app over the internet through the Apache
server.

Any help would be greatly appreciated.

Thanks

Mar 17 '06 #1
4 1658
when you use Response.Redirect, by default asp.net generates a fully
qualified url. in your case

Response.Redirect ("~/somepage.aspx")

returns:

http://machine.company.location.md.u.../somepage.aspx

which is bypassing the proxy. you should turn off fully qualified redirects
in the HttpRuntimeSection. once you turn it off I don't believe ~ operator
will work, you will have to do relative redirects.

-- bruce (sqlwork.com)

"Stan Canepa" <sc*****@docksidesoftware.com> wrote in message
news:Oo*************@TK2MSFTNGP10.phx.gbl...
I have a web app that works fine on the development machine and on several
servers running Win2k IIS 5 and Windows2003 IIS 6. But I am having an
issue
on one particular erver running Win2k IIS 5, but has an Apache server
sending redirects to this server.

My problem is when I try to do a

Response.Redirect ("~/somepage.aspx")

The page calling the Response.Rediect is in the same directory as the
somepage.aspx, but I get 404 Page Not Found Error. This happens
everytime.
The test app I was working with was as simple as having two web forms, and
in the page load of the first have the redirct to the other.

Another piece of info that may be of relevance is that the web app is
running on port 90 because the Apache runs on 80. The Apache configuration
file looks something like

Proxypass /dw/ http://machine.company.location.md.us:90/
ProxyPassreverse /dw/ http://machine.company.location.md.us:90/

So www.mainsite.com/dw/ would redirect to my server using port 90.

Also the application runs fine if ran from the server itself. I only have
the problem when accessing the app over the internet through the Apache
server.

Any help would be greatly appreciated.

Thanks

Mar 17 '06 #2
Thus wrote Stan,
I have a web app that works fine on the development machine and on
several servers running Win2k IIS 5 and Windows2003 IIS 6. But I am
having an issue on one particular erver running Win2k IIS 5, but has
an Apache server sending redirects to this server.

My problem is when I try to do a

Response.Redirect ("~/somepage.aspx")

The page calling the Response.Rediect is in the same directory as the
somepage.aspx, but I get 404 Page Not Found Error. This happens
everytime. The test app I was working with was as simple as having two
web forms, and in the page load of the first have the redirct to the
other.

Another piece of info that may be of relevance is that the web app is
running on port 90 because the Apache runs on 80. The Apache
configuration file looks something like

Proxypass /dw/ http://machine.company.location.md.us:90/
ProxyPassreverse /dw/ http://machine.company.location.md.us:90/

So www.mainsite.com/dw/ would redirect to my server using port 90.

Also the application runs fine if ran from the server itself. I only
have the problem when accessing the app over the internet through the
Apache server.


Running a proxy like Fiddler (www.fiddlertool.com) should reveal the problem.
What I think happens is that
Response.Redirect ("~/somepage.aspx")
produces something like
HTTP/1.1 302 Found
Server: Microsoft-IIS/5.1
Date: Fri, 17 Mar 2006 17:44:04 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: /<YourApplicationRoot>/somepage.aspx

That would be wrong: It doesn't access the rewritten path /dw/. I can actually
create a similar issue by just using another redirection virtual directory
in IIS. The fix is to create the redirect location manually.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Mar 17 '06 #3
Thus wrote Bruce,
when you use Response.Redirect, by default asp.net generates a fully
qualified url. in your case

Response.Redirect ("~/somepage.aspx")

returns:

http://machine.company.location.md.u.../somepage.aspx

which is bypassing the proxy. you should turn off fully qualified
redirects in the HttpRuntimeSection. once you turn it off I don't
believe ~ operator will work, you will have to do relative redirects.


Are you sure? According to MSDN and my own observations, it's set to false
by default. Anyway, it's a better approach than constructing the URL manually,
but there may be situations in which it cannot be avoided.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Mar 17 '06 #4
I was looking information up on
HttpRuntimeSection.UseFullyQualifiedRedirectUrl and have found that it is
new to the .Net Framework version 2. The site was written in VS 2003
framework version 1.1.4322. I have a feeling you are right about the path.
Any other ideas about how I might go about fixing the issue? Do you think
Transfer would work?
"Bruce Barker" <br******************@safeco.com> wrote in message
news:O%****************@TK2MSFTNGP11.phx.gbl...
when you use Response.Redirect, by default asp.net generates a fully
qualified url. in your case

Response.Redirect ("~/somepage.aspx")

returns:

http://machine.company.location.md.u.../somepage.aspx

which is bypassing the proxy. you should turn off fully qualified redirects in the HttpRuntimeSection. once you turn it off I don't believe ~ operator
will work, you will have to do relative redirects.

-- bruce (sqlwork.com)

"Stan Canepa" <sc*****@docksidesoftware.com> wrote in message
news:Oo*************@TK2MSFTNGP10.phx.gbl...
I have a web app that works fine on the development machine and on several servers running Win2k IIS 5 and Windows2003 IIS 6. But I am having an
issue
on one particular erver running Win2k IIS 5, but has an Apache server
sending redirects to this server.

My problem is when I try to do a

Response.Redirect ("~/somepage.aspx")

The page calling the Response.Rediect is in the same directory as the
somepage.aspx, but I get 404 Page Not Found Error. This happens
everytime.
The test app I was working with was as simple as having two web forms, and in the page load of the first have the redirct to the other.

Another piece of info that may be of relevance is that the web app is
running on port 90 because the Apache runs on 80. The Apache configuration file looks something like

Proxypass /dw/ http://machine.company.location.md.us:90/
ProxyPassreverse /dw/ http://machine.company.location.md.us:90/

So www.mainsite.com/dw/ would redirect to my server using port 90.

Also the application runs fine if ran from the server itself. I only have the problem when accessing the app over the internet through the Apache
server.

Any help would be greatly appreciated.

Thanks


Mar 17 '06 #5

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

Similar topics

1
by: while_1 | last post by:
If I have a links page that uses php header calls, for each link, to jump to an external page, does Google see those links as "internal to my site" or do they get counted as links to the redirect?...
0
by: David Levine | last post by:
This may be an easy one (I hope so). The ultimate goal I have is to be able to use binding redirects that are specific to secondary appdomains, so that each appdomain can have a unique...
1
by: VK | last post by:
Hi, We built a new site using ASP.NET. Our old site used mainly static pages, .shtml pages. The issue arises when user searches and results with .shtml pages are still be displayed by...
10
by: David Shorthouse | last post by:
Hey folks, I have my entire ASP-driven site in a one-frame frameset to preserve a static URL in a browser's address bar. I also have a customized 404 page to redirect a visitor to the top,...
2
by: Daniel | last post by:
how to detect who redirects traffic to a aspx page? is this info passed along in request object or can sites anonymously redirect traffic to other sites?
4
by: Stan Canepa | last post by:
I have a web app that works fine on the development machine and on several servers running Win2k IIS 5 and Windows2003 IIS 6. But I am having an issue on one particular erver running Win2k IIS 5,...
2
by: Rob R. Ainscough | last post by:
I'm using a single Master page. I'm having some strange results using Redirects in master pages using relative pathing i.e ~. I'm using Form authentication and whenever I navigate to my Login...
5
by: Advo | last post by:
Hey there. Is there any reason why redirects in my code would cause the error: "Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are...
4
by: Daniel Greene | last post by:
Dear Group, I haven't been on this newsgroup in years. Hello again to village elders Lars Eighner, Alan Flavelle, and Jukka Korpela! :-) What brings me back? I was using the W3C QA to validate...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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
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,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.