473,749 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ 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.Redire ct ("~/somepage.aspx")

The page calling the Response.Rediec t 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/
ProxyPassrevers e /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 1672
when you use Response.Redire ct, by default asp.net generates a fully
qualified url. in your case

Response.Redire ct ("~/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 HttpRuntimeSect ion. 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*****@docksi desoftware.com> wrote in message
news:Oo******** *****@TK2MSFTNG P10.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.Redire ct ("~/somepage.aspx")

The page calling the Response.Rediec t 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/
ProxyPassrevers e /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.Redire ct ("~/somepage.aspx")

The page calling the Response.Rediec t 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/
ProxyPassrevers e /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.Redire ct ("~/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: /<YourApplicatio nRoot>/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********@joer gjooss.de
Mar 17 '06 #3
Thus wrote Bruce,
when you use Response.Redire ct, by default asp.net generates a fully
qualified url. in your case

Response.Redire ct ("~/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 HttpRuntimeSect ion. 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********@joer gjooss.de
Mar 17 '06 #4
I was looking information up on
HttpRuntimeSect ion.UseFullyQua lifiedRedirectU rl 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.c om> wrote in message
news:O%******** ********@TK2MSF TNGP11.phx.gbl. ..
when you use Response.Redire ct, by default asp.net generates a fully
qualified url. in your case

Response.Redire ct ("~/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 HttpRuntimeSect ion. 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*****@docksi desoftware.com> wrote in message
news:Oo******** *****@TK2MSFTNG P10.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.Redire ct ("~/somepage.aspx")

The page calling the Response.Rediec t 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/
ProxyPassrevers e /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
2682
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? IE: people ask me to exchange links all the time. Sometimes (usually not) I do it, but always with a link to in interal-to-my site file that has a header("Location: http://someothersite.com");
0
1406
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 configuration. Here's are the details: I want to force all references to a particular assembly version to use the latest version of the assembly. I can do this by adding binding redirects to the app config file and in a test I did it all works fine.
1
1324
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 search engines. I have added some code in webconfig file to redirect error, also changed in IIS Custom error(404) properties to default to an .aspx custom error page.
10
2131
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, default frameset. The redirect works, but the called, nonexistent URL remains in the browser's address bar. Is there any way to refresh a browser's address in the address bar to that of the site's default, frameset address? I tried using a...
2
2618
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
1197
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, 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
2
1481
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 form (under a different dir called Secure) and then navigate back to my main form under root dir and then try to navigate to another form at the root dir level, it will look for the aspx page under the "Secure" dir rather than my root dir?? ...
5
1638
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 blocked." If that is whats causing the problems? My code has been uploaded to http://rafb.net/paste/results/NcOw3L40.html instead of filling this post up.
4
2124
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 my XHTML the other day, and I came across this "tip of the day" called "Use standard redirects: don't break the back button!" It said, "If you want http://www.example.org/foo to actually display what's at http://www.example.org/bar you should...
0
8996
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
8832
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
9566
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...
0
9388
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
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,...
1
6800
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
6078
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
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...
2
2791
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.