Last post Apr 23, 2009 11:33 PM by malcolms
Apr 21, 2009 05:17 PM|Synthetikk242|LINK
Apr 21, 2009 06:21 PM|donkiely|LINK
It basically means that you have an infinite loop (maybe not infinite, but too many) that redirects to a page that redirects to a page, that...
Why don't you post the code for your button, and we can start there to solve the problem?
Apr 22, 2009 04:31 AM|Synthetikk242|LINK
Well, i can't post all the code, there's too much of it. But I've traced thru all of it and there is technically only one redirect.. something like this:
protected void btnLogin_Click(object sender, EventArgs e)
// get login credentials from database
// if login info valid...
Why would it work on my home computer, but not on a live production server?
And how many Redirects is "too many"?
I know the code above seems very vague, but that's about all there is to it...
Apr 22, 2009 04:37 AM|malcolms|LINK
Apr 22, 2009 04:58 PM|Synthetikk242|LINK
Apr 22, 2009 05:33 PM|donkiely|LINK
On your home machine, are you running in the ASP.NET development server (Cassini) or IIS? That may be the difference. But all that means is that the behavior will probably be different. You still have the problem.
Let's get back to basics. Something is happening with the redirect. First, have you taken the advice in the error message and cleared your cookies for the site? Do that first and try again.
Back? Okay, I'm going to guess that didn't solve the problem. Tell us more about the application. What kind of authentication are you using? I can't really tell for sure the details from the code snippet you posted. That may come into play because there
may be something going on with the redirect to a login page.
I know you said the code is complex, but if you can extract a few lines that affect the redirection, that might help solve the problem.
Apr 22, 2009 06:35 PM|Synthetikk242|LINK
Apr 23, 2009 12:25 AM|donkiely|LINK
Stumped is right. [:P]
Okay, using IIS versus Cassini could account for the difference in behavior. Let's set that aside for now and focus on what I suspect is really the problem.
Have you tried putting a breakpoint in the code and stepping through it? That might show something, but it probably also changes the behavior. You could do something with the Debug or Trace objects and show what's happening in VS's Output window.
What is happening in Default.aspx? It is quite possible that is where the problem is. IOW, you redirect to that page, then the code there does the infinit redirects. Is that a possibility?
Apr 23, 2009 01:58 PM|Synthetikk242|LINK
Apr 23, 2009 11:33 PM|malcolms|LINK
Yes please update this forum when you discover what the problem was. It is an interesting one!