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

ASP Redirects

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.

Any ideas please?

I just cant view any of the pages, these were working fine the other
day, and no code has been changed as far as i know.

Thanks!
Jul 11 '06 #1
5 1618
Advo wrote:
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.

Any ideas please?

I just cant view any of the pages, these were working fine the other
day, and no code has been changed as far as i know.

Thanks!

I've just done a test, its definately dying when it hits one of the
redirect statements. I cant see how, or why this happens, especially
since it works fine at work??
Jul 12 '06 #2

Advo wrote:
Advo wrote:
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.

Any ideas please?

I just cant view any of the pages, these were working fine the other
day, and no code has been changed as far as i know.

Thanks!


I've just done a test, its definately dying when it hits one of the
redirect statements. I cant see how, or why this happens, especially
since it works fine at work??
Pity you didn't post the code for the pages people are redirected to,
as my guess is that they contain redirects themselves that sends the
code into a loop. Instead of all those response.redirects, which I
guess send people to pages saying "Thanks for completing the
questionnaire" and other things like that, why don't you try replacing
the redirects with response.writes to see if this cures the problem.

--
Mike Brind

Jul 12 '06 #3

Mike Brind wrote:
Advo wrote:
Advo wrote:
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.
>
Any ideas please?
>
I just cant view any of the pages, these were working fine the other
day, and no code has been changed as far as i know.
>
Thanks!

I've just done a test, its definately dying when it hits one of the
redirect statements. I cant see how, or why this happens, especially
since it works fine at work??

Pity you didn't post the code for the pages people are redirected to,
as my guess is that they contain redirects themselves that sends the
code into a loop. Instead of all those response.redirects, which I
guess send people to pages saying "Thanks for completing the
questionnaire" and other things like that, why don't you try replacing
the redirects with response.writes to see if this cures the problem.

--
Mike Brind
Mate, i think you've hit the nail on the head. Ive been checking the
code over and over, never even thought about testing the code that its
being redirected to.

Would this still occur if im running from say page1.asp which redirects
to thanks.asp once the form has submitted (this is where im getting the
error message) but surely that message would only occur, if the page
had actually got to thanks.asp and then hit the redirect loops?

Thanks

Jul 12 '06 #4

Advo wrote:
Mike Brind wrote:
Advo wrote:
Advo wrote:
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.

Any ideas please?

I just cant view any of the pages, these were working fine the other
day, and no code has been changed as far as i know.

Thanks!
>
>
I've just done a test, its definately dying when it hits one of the
redirect statements. I cant see how, or why this happens, especially
since it works fine at work??
Pity you didn't post the code for the pages people are redirected to,
as my guess is that they contain redirects themselves that sends the
code into a loop. Instead of all those response.redirects, which I
guess send people to pages saying "Thanks for completing the
questionnaire" and other things like that, why don't you try replacing
the redirects with response.writes to see if this cures the problem.

--
Mike Brind

Mate, i think you've hit the nail on the head. Ive been checking the
code over and over, never even thought about testing the code that its
being redirected to.

Would this still occur if im running from say page1.asp which redirects
to thanks.asp once the form has submitted (this is where im getting the
error message) but surely that message would only occur, if the page
had actually got to thanks.asp and then hit the redirect loops?

Thanks
I don't quite understand your question. As an example, say page1.asp
contains a redirect on succesful completion of a form to page2.asp. On
page2.asp you have some code checking for a flag (session variable,
querystring value, cookie etc) that the person has successfully
completed the form and not arrived there by accident. If it's not set,
you redirect them to page1.asp to complete the form. However some code
on page1.asp rules that a condition under which a redirect to page2.asp
is necessary is true, and sends the visitor back to page2.asp etc. And
on it goes until the browser decides it's had enough.

So, you need to check all your conditions on all pages, or start off
with this first one by taking up my initial suggestion and replace
redirects with response.writes to see which ones fire unexpectedly, and
under what conditions.

By the way, the best way to solve this kind of problem is to have all
your code in one page, with the form posting back to itself.

--
Mike Brind

Jul 12 '06 #5

Mike Brind wrote:
Advo wrote:
Mike Brind wrote:
Advo wrote:
Advo wrote:
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.
>
Any ideas please?
>
I just cant view any of the pages, these were working fine the other
day, and no code has been changed as far as i know.
>
Thanks!


I've just done a test, its definately dying when it hits one of the
redirect statements. I cant see how, or why this happens, especially
since it works fine at work??
>
Pity you didn't post the code for the pages people are redirected to,
as my guess is that they contain redirects themselves that sends the
code into a loop. Instead of all those response.redirects, which I
guess send people to pages saying "Thanks for completing the
questionnaire" and other things like that, why don't you try replacing
the redirects with response.writes to see if this cures the problem.
>
--
Mike Brind
Mate, i think you've hit the nail on the head. Ive been checking the
code over and over, never even thought about testing the code that its
being redirected to.

Would this still occur if im running from say page1.asp which redirects
to thanks.asp once the form has submitted (this is where im getting the
error message) but surely that message would only occur, if the page
had actually got to thanks.asp and then hit the redirect loops?

Thanks

I don't quite understand your question. As an example, say page1.asp
contains a redirect on succesful completion of a form to page2.asp. On
page2.asp you have some code checking for a flag (session variable,
querystring value, cookie etc) that the person has successfully
completed the form and not arrived there by accident. If it's not set,
you redirect them to page1.asp to complete the form. However some code
on page1.asp rules that a condition under which a redirect to page2.asp
is necessary is true, and sends the visitor back to page2.asp etc. And
on it goes until the browser decides it's had enough.

So, you need to check all your conditions on all pages, or start off
with this first one by taking up my initial suggestion and replace
redirects with response.writes to see which ones fire unexpectedly, and
under what conditions.

By the way, the best way to solve this kind of problem is to have all
your code in one page, with the form posting back to itself.

--
Mike Brind

I think the problem is down to the fact that on my thanks.asp page,
there was some existing code that was searching for a customerid string
(?customerid=.....)

but, because my main page was only redirecting to thanks.asp AS IT
SHOULD, there was no need for this code in there.

Am i right in thinking..

My main page was fine, the user completes the questionnaire and is
taken to thanks.asp but on thanks.asp it is waiting for that customerid
string (which it will never get) so then, because there is no customer
id form they are being taken to noquestionnaire.asp which also
contained that same code. noquestionnaire.asp is also waiting for a
customerid, which it wont get, so again this is taking them to
noquestionnaire.asp where it hits the loop again.

I think this is the main problem, and Mike i thank you for making me
see and fix the error.

It was working like:

Mainpage.asp -thanks.asp -noquestionnaire.asp (waits for custid -
false) -noquestionnaire.asp (waits for custid - false) ->
noquestionnaire.asp and so forth. This is where i feel my indefinate
loop occured. This has now been rectified.!

Jul 12 '06 #6

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?
0
by: Per Agerbęk | last post by:
an application, that automates using a website. An upcomming change, is the introduction of a java webstart file (.jnlp). The user press this link <a id="dgBoeger__ctl4_Linkbutton1"...
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...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.