473,320 Members | 1,814 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,320 software developers and data experts.

Issue with double redirect

Seb
Hi,

We have a page in VB.NET redirecting to an external site.

Example: http://mysite.com/redirect.aspx?url=...their-page.asp

The target page on the external site (http//externalsite.com/their-
page.asp in this example) also redirects to another page (let's say
"their-page2.asp") on their website).

When people click on my original link, Internet Explorer exhibits some
strange behaviour.

The first time, the IE address bar will show: http://mysite.com/their-page2.asp
(basically, staying on the original domain but trying to get the page
from the external site), resulting in a "page not found".

However, during subsequent attempts, IE sometimes gets it right, and
does redirect to "http//externalsite.com/their-page2.asp".

Can something be done on our aspx page to ensure that the redirect
works properly? Is this a defect with IE?

Thanks,
Seb

May 24 '07 #1
5 5962

Seb wrote:
Hi,

We have a page in VB.NET redirecting to an external site.

Example: http://mysite.com/redirect.aspx?url=...their-page.asp
If you want to pass a string containing slashes in the url as query
parameter you have to encode it.
Use HttpUtility.UrlEncode and HttpUtility.UrlDecode.
Regards,
Mykola
http://marss.co.ua

May 24 '07 #2
A problem with your redirect string as well is that you are missing a colon
: should be http://

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"marss" <ma******@gmail.comwrote in message
news:11**********************@q66g2000hsg.googlegr oups.com...
>
Seb wrote:
>Hi,

We have a page in VB.NET redirecting to an external site.

Example:
http://mysite.com/redirect.aspx?url=...their-page.asp

If you want to pass a string containing slashes in the url as query
parameter you have to encode it.
Use HttpUtility.UrlEncode and HttpUtility.UrlDecode.
Regards,
Mykola
http://marss.co.ua

May 24 '07 #3
Seb
Thanks,

the example was poorly constructed, but our pages have the proper
encoding and URLs as parameters, so it appears to be an issue with the
redirect itself. The same happens when the URL is actually hard-coded
within our redirect page.

David wrote:
A problem with your redirect string as well is that you are missing a colon
: should be http://

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"marss" <ma******@gmail.comwrote in message
news:11**********************@q66g2000hsg.googlegr oups.com...

Seb wrote:
Hi,

We have a page in VB.NET redirecting to an external site.

Example:
http://mysite.com/redirect.aspx?url=...their-page.asp
If you want to pass a string containing slashes in the url as query
parameter you have to encode it.
Use HttpUtility.UrlEncode and HttpUtility.UrlDecode.
Regards,
Mykola
http://marss.co.ua
May 24 '07 #4
without a sample of your redirect code, there is no way to figure out
what your code is doing wrong.

if the url will work in the browser (paste it in the address bar, then
it should work as a redirect.
-- bruce (sqlwork.com)

Seb wrote:
Thanks,

the example was poorly constructed, but our pages have the proper
encoding and URLs as parameters, so it appears to be an issue with the
redirect itself. The same happens when the URL is actually hard-coded
within our redirect page.

David wrote:
>A problem with your redirect string as well is that you are missing a colon
: should be http://

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"marss" <ma******@gmail.comwrote in message
news:11**********************@q66g2000hsg.googleg roups.com...
>>Seb wrote:
Hi,

We have a page in VB.NET redirecting to an external site.

Example:
http://mysite.com/redirect.aspx?url=...their-page.asp
If you want to pass a string containing slashes in the url as query
parameter you have to encode it.
Use HttpUtility.UrlEncode and HttpUtility.UrlDecode.
Regards,
Mykola
http://marss.co.ua
May 24 '07 #5
Seb
I have found some info more regarding this issue.

The external page the asp code is redirecting to is protected by NTLM,
so the first time, the user gets prompted his login/password, and the
redirect fails (the URL is appended to the current site).

The second time, the redirect works (as the user is already
authenticated).

Is there a solution to have a proper redirect to an external site/page
protected by NTLM works?

Thanks,
Seb

Seb wrote:
Thanks,

the example was poorly constructed, but our pages have the proper
encoding and URLs as parameters, so it appears to be an issue with the
redirect itself. The same happens when the URL is actually hard-coded
within our redirect page.

David wrote:
A problem with your redirect string as well is that you are missing a colon
: should be http://

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"marss" <ma******@gmail.comwrote in message
news:11**********************@q66g2000hsg.googlegr oups.com...
>
Seb wrote:
>Hi,
>>
>We have a page in VB.NET redirecting to an external site.
>>
>Example:
>http://mysite.com/redirect.aspx?url=...their-page.asp
>
If you want to pass a string containing slashes in the url as query
parameter you have to encode it.
Use HttpUtility.UrlEncode and HttpUtility.UrlDecode.
Regards,
Mykola
http://marss.co.ua
>
May 30 '07 #6

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

Similar topics

2
by: bagsmode | last post by:
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried...
7
by: ndessai | last post by:
Hi All, I discovered following issue with the VC 7.1 compiler regarding the backword compatibility. I created a dll (Redirect.dll) which exposes a function and simply writes some text (say...
4
by: simon | last post by:
which data control allows me to use a cell doubleClick event? I have time cells (something like Outlook calendar) and when user double click on one cell I would like to redirect to other window...
12
by: Assaf | last post by:
Hi all, My client is using an online service provider that processes survey responses. After a user fills survey.aspx and presses the OK button, 2 things need to happen: 1. the data has to...
6
by: Mike | last post by:
I have a function that is called when the user clicks the submit button, during this function i also set a varaible to "Y" due to that this function does a post back to the page then redirects....
5
by: DougS | last post by:
I have this code behind a button that does not work: Dim sQuote As String = txtQuoteNum.Text Dim iQuote As Int32 = CType(sQuote, Int32) Dim sUrl As String = "Demographics.aspx?Quote=" &...
0
by: volcovcommander | last post by:
I'm experiencing what looks like an http 1.1 100 continue issue with IE 6, IIS 6 and an ASP.NET app. The scenario is such: - I send POST request to page A which then should redirect to page B;...
3
by: James Thomas | last post by:
I have an issue with the login process on my site since the upgrade to ASP .NET 2.0 (from 1.1). I have the standard textbox and button for logging and my own custom login process. I'd like to...
14
by: n3o | last post by:
Hello Comp.Lang.C Members, I have an issue with user input that I have been trying to figure out for the longest. For instance, let's say you have something like this: void foo() { int num;...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.