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

C# - Infinite loop when redirecting to a mobile webpage from the default login.

Hi,

I'm currently in the process of constructing a stripped down version of the company website that will be show to people logging in from a mobile device. When the user logs in to the homepage, he or she is directed to the homepage default.aspx, where they can login. As part of the Page_Load of this page, I added a check if the Request.Browser.IsMobileDevice, and in that case redirected to the custom mobile login page: Response.Redirect("~/mobile/login.aspx", true). However, the redirection never happens, and instead the program returns to the Page_Load in default.aspx, which creates an infinite loop. Does anyone know why this could be? I have noticed in the output console that when the redirection happens there is an unhandled ThreadAbortException in App_Web_<app specific string>.dll, does this mean anything? I have tried stepping through the code but as soon as I enter the Redirect the method returns right back to the top of Page_Load.

Thanks,
Aug 22 '07 #1
1 2974
Problem solved,

Response.Redirect is just a suggestion, which somehow the webpage didn't answer to. I guess the urge to take me to the default page was more important. However, the Server.Transfer method terminated the current request completely and initiated a new one to the mobile webpage, a command instead of a suggestion. In case you are interested check out:
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=15
Aug 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

43
by: Gremlin | last post by:
If you are not familiar with the halting problem, I will not go into it in detail but it states that it is impossible to write a program that can tell if a loop is infinite or not. This is a...
4
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
4
by: jjjooooohhnnn | last post by:
Greetings, I have encountered what appears to be a fairly common problem: RedirectFromLoginPage is not redirecting to RedirectUrl. I have tried all the advice that I could on the 'net, and...
1
by: strout | last post by:
I never heard of mobile webpage. Did anybody know? Our client asked us if he can access their website's mobile website. My understnading is the mobile browser can access any website just like...
1
by: SJ | last post by:
I'm developing a WAP client which presently works fine on most mobile phone browsers, but gives me an Infinite loop error (error 1025) when i try to access it from a couple of phones(motorola for...
0
by: Vedran Vukotic | last post by:
Hello I made the following infinite loop that check's if the bot died and call it again: ------loadloop.pl----- #!/usr/bin/perl use strict; while (1) {
10
by: =?ISO-8859-1?Q?G=E9rard_Talbot?= | last post by:
www.authoring.stylesheets] Dear fellow CSS colleagues and web authors in alt.html discussion forum, I would like to ask you to help me confirm that there is a serious bug in IE 7 final release...
3
by: Sleepwalker | last post by:
Hi, I'm currently working on creating a stripped down part of a company web page, that will be accessed from cellphone. The problem I have is that the Windows Forms authentication makes it...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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...

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.