Response.Redirect Hangs

Discussion in 'ASP .Net' started by =?Utf-8?B?d2ViZ3V5QGNvbW11bml0eS5ub3NwYW0=?=, Jan 25, 2007.

  1. We have been running into some problems where using Response.Redirect causes
    the page to hang and it never actually redirects.

    Here's the scenario:
    User opens the page, selects an item from the drop down list and then clicks
    one of a couple of buttons to send them off to another page. We do a little
    bit of validation in the Event Handler and then do a Response.Redirect off to
    the next page. Then the page just sits there and never redirects over to the
    new page. Sometimes this will happen on the first time the button is clicked
    and if you click it again it will work. And then other times things work
    fine for a few clicks and then it stalls. I put in some code to write to the
    event log when the Event Handler runs but before the Response.Redirect and
    this code is being fired and the event is written but the page just doesn't
    redirect. The server is running Server 2003 with the 2.0 Framework
    installed. The website does use integrated security.
    This appears to be an IE only thing because if I run the site using firefox,
    there aren't any problems.

    We haven't been able to duplicate these Hang's on our local development
    machines (XP Pro, Visual Studio 2005, .Net Framework 2.0 app)

    I've seen some other postings that said that the "Smart Navigation" setting
    was the culprit but I can't find any evidence of "Smart Navigation" code in
    the source of the page (but I might not be looking at the right thing).

    Has anyone else seen this?
    =?Utf-8?B?d2ViZ3V5QGNvbW11bml0eS5ub3NwYW0=?=, Jan 25, 2007
    #1
    1. Advertising

  2. Are you using SmartNavigation? If you are turn it off and try again.

    --
    Jerry J


    "" wrote:

    > We have been running into some problems where using Response.Redirect causes
    > the page to hang and it never actually redirects.
    >
    > Here's the scenario:
    > User opens the page, selects an item from the drop down list and then clicks
    > one of a couple of buttons to send them off to another page. We do a little
    > bit of validation in the Event Handler and then do a Response.Redirect off to
    > the next page. Then the page just sits there and never redirects over to the
    > new page. Sometimes this will happen on the first time the button is clicked
    > and if you click it again it will work. And then other times things work
    > fine for a few clicks and then it stalls. I put in some code to write to the
    > event log when the Event Handler runs but before the Response.Redirect and
    > this code is being fired and the event is written but the page just doesn't
    > redirect. The server is running Server 2003 with the 2.0 Framework
    > installed. The website does use integrated security.
    > This appears to be an IE only thing because if I run the site using firefox,
    > there aren't any problems.
    >
    > We haven't been able to duplicate these Hang's on our local development
    > machines (XP Pro, Visual Studio 2005, .Net Framework 2.0 app)
    >
    > I've seen some other postings that said that the "Smart Navigation" setting
    > was the culprit but I can't find any evidence of "Smart Navigation" code in
    > the source of the page (but I might not be looking at the right thing).
    >
    > Has anyone else seen this?
    =?Utf-8?B?SmVycnkgSg==?=, Jan 25, 2007
    #2
    1. Advertising

  3. Sorry, didn't see your last couple of paragraphs before my first reply.

    Smart Navigation can be turned on for your whole site with a setting in the
    web.config. Did you look there?

    I had exactly the problem you are talking about. It was caused by smart
    navigation.
    --
    Jerry J


    "" wrote:

    > We have been running into some problems where using Response.Redirect causes
    > the page to hang and it never actually redirects.
    >
    > Here's the scenario:
    > User opens the page, selects an item from the drop down list and then clicks
    > one of a couple of buttons to send them off to another page. We do a little
    > bit of validation in the Event Handler and then do a Response.Redirect off to
    > the next page. Then the page just sits there and never redirects over to the
    > new page. Sometimes this will happen on the first time the button is clicked
    > and if you click it again it will work. And then other times things work
    > fine for a few clicks and then it stalls. I put in some code to write to the
    > event log when the Event Handler runs but before the Response.Redirect and
    > this code is being fired and the event is written but the page just doesn't
    > redirect. The server is running Server 2003 with the 2.0 Framework
    > installed. The website does use integrated security.
    > This appears to be an IE only thing because if I run the site using firefox,
    > there aren't any problems.
    >
    > We haven't been able to duplicate these Hang's on our local development
    > machines (XP Pro, Visual Studio 2005, .Net Framework 2.0 app)
    >
    > I've seen some other postings that said that the "Smart Navigation" setting
    > was the culprit but I can't find any evidence of "Smart Navigation" code in
    > the source of the page (but I might not be looking at the right thing).
    >
    > Has anyone else seen this?
    =?Utf-8?B?SmVycnkgSg==?=, Jan 25, 2007
    #3
  4. I just tried setting <pages smartNavigation="false" /> in the web.config but
    that doesn't seem to have helped. I can't find any settings for Smart
    Navigation in any of the page directives either.


    "Jerry J" wrote:

    > Sorry, didn't see your last couple of paragraphs before my first reply.
    >
    > Smart Navigation can be turned on for your whole site with a setting in the
    > web.config. Did you look there?
    >
    > I had exactly the problem you are talking about. It was caused by smart
    > navigation.
    > --
    > Jerry J
    >
    >
    > "" wrote:
    >
    > > We have been running into some problems where using Response.Redirect causes
    > > the page to hang and it never actually redirects.
    > >
    > > Here's the scenario:
    > > User opens the page, selects an item from the drop down list and then clicks
    > > one of a couple of buttons to send them off to another page. We do a little
    > > bit of validation in the Event Handler and then do a Response.Redirect off to
    > > the next page. Then the page just sits there and never redirects over to the
    > > new page. Sometimes this will happen on the first time the button is clicked
    > > and if you click it again it will work. And then other times things work
    > > fine for a few clicks and then it stalls. I put in some code to write to the
    > > event log when the Event Handler runs but before the Response.Redirect and
    > > this code is being fired and the event is written but the page just doesn't
    > > redirect. The server is running Server 2003 with the 2.0 Framework
    > > installed. The website does use integrated security.
    > > This appears to be an IE only thing because if I run the site using firefox,
    > > there aren't any problems.
    > >
    > > We haven't been able to duplicate these Hang's on our local development
    > > machines (XP Pro, Visual Studio 2005, .Net Framework 2.0 app)
    > >
    > > I've seen some other postings that said that the "Smart Navigation" setting
    > > was the culprit but I can't find any evidence of "Smart Navigation" code in
    > > the source of the page (but I might not be looking at the right thing).
    > >
    > > Has anyone else seen this?
    =?Utf-8?B?d2ViZ3V5QGNvbW11bml0eS5ub3NwYW0=?=, Jan 25, 2007
    #4
  5. I ran into this problem involving smart navigation. I found that smart nav
    was the problem by using the View Source command in the browser after the
    redirection attempt. I saw a tag with a reference to smart navigation in the
    returned page. I don't remember the precise name of the tag. The problem
    was fixed by turning smart nav off as you have already done. However,
    looking at source of the returned page may point you toward a resolution.

    I hope this helps.

    Eagle.

    "" wrote:

    > I just tried setting <pages smartNavigation="false" /> in the web.config but
    > that doesn't seem to have helped. I can't find any settings for Smart
    > Navigation in any of the page directives either.
    >
    >
    > "Jerry J" wrote:
    >
    > > Sorry, didn't see your last couple of paragraphs before my first reply.
    > >
    > > Smart Navigation can be turned on for your whole site with a setting in the
    > > web.config. Did you look there?
    > >
    > > I had exactly the problem you are talking about. It was caused by smart
    > > navigation.
    > > --
    > > Jerry J
    > >
    > >
    > > "" wrote:
    > >
    > > > We have been running into some problems where using Response.Redirect causes
    > > > the page to hang and it never actually redirects.
    > > >
    > > > Here's the scenario:
    > > > User opens the page, selects an item from the drop down list and then clicks
    > > > one of a couple of buttons to send them off to another page. We do a little
    > > > bit of validation in the Event Handler and then do a Response.Redirect off to
    > > > the next page. Then the page just sits there and never redirects over to the
    > > > new page. Sometimes this will happen on the first time the button is clicked
    > > > and if you click it again it will work. And then other times things work
    > > > fine for a few clicks and then it stalls. I put in some code to write to the
    > > > event log when the Event Handler runs but before the Response.Redirect and
    > > > this code is being fired and the event is written but the page just doesn't
    > > > redirect. The server is running Server 2003 with the 2.0 Framework
    > > > installed. The website does use integrated security.
    > > > This appears to be an IE only thing because if I run the site using firefox,
    > > > there aren't any problems.
    > > >
    > > > We haven't been able to duplicate these Hang's on our local development
    > > > machines (XP Pro, Visual Studio 2005, .Net Framework 2.0 app)
    > > >
    > > > I've seen some other postings that said that the "Smart Navigation" setting
    > > > was the culprit but I can't find any evidence of "Smart Navigation" code in
    > > > the source of the page (but I might not be looking at the right thing).
    > > >
    > > > Has anyone else seen this?
    =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==, Jan 25, 2007
    #5
  6. I finally tracked down the problem with the redirects.

    In some instances we were doing Response.Redirect("URL here",false) to try
    and avoid the bogus System.Threading.ThreadAbort exceptions. By changing
    this back to Response.Redirect("URL",True) it fixes the problem but it means
    that we have to trap the ThreadAbortExceptions so that they won't bubble up.
    The ThreadAbort doesn't really cause a problem, it just causes our code to
    log errors that it doesn't need to. Thanks for the suggestions on what to
    look for on this one though.


    "" wrote:

    > I ran into this problem involving smart navigation. I found that smart nav
    > was the problem by using the View Source command in the browser after the
    > redirection attempt. I saw a tag with a reference to smart navigation in the
    > returned page. I don't remember the precise name of the tag. The problem
    > was fixed by turning smart nav off as you have already done. However,
    > looking at source of the returned page may point you toward a resolution.
    >
    > I hope this helps.
    >
    > Eagle.
    >
    > "" wrote:
    >
    > > I just tried setting <pages smartNavigation="false" /> in the web.config but
    > > that doesn't seem to have helped. I can't find any settings for Smart
    > > Navigation in any of the page directives either.
    > >
    > >
    > > "Jerry J" wrote:
    > >
    > > > Sorry, didn't see your last couple of paragraphs before my first reply.
    > > >
    > > > Smart Navigation can be turned on for your whole site with a setting in the
    > > > web.config. Did you look there?
    > > >
    > > > I had exactly the problem you are talking about. It was caused by smart
    > > > navigation.
    > > > --
    > > > Jerry J
    > > >
    > > >
    > > > "" wrote:
    > > >
    > > > > We have been running into some problems where using Response.Redirect causes
    > > > > the page to hang and it never actually redirects.
    > > > >
    > > > > Here's the scenario:
    > > > > User opens the page, selects an item from the drop down list and then clicks
    > > > > one of a couple of buttons to send them off to another page. We do a little
    > > > > bit of validation in the Event Handler and then do a Response.Redirect off to
    > > > > the next page. Then the page just sits there and never redirects over to the
    > > > > new page. Sometimes this will happen on the first time the button is clicked
    > > > > and if you click it again it will work. And then other times things work
    > > > > fine for a few clicks and then it stalls. I put in some code to write to the
    > > > > event log when the Event Handler runs but before the Response.Redirect and
    > > > > this code is being fired and the event is written but the page just doesn't
    > > > > redirect. The server is running Server 2003 with the 2.0 Framework
    > > > > installed. The website does use integrated security.
    > > > > This appears to be an IE only thing because if I run the site using firefox,
    > > > > there aren't any problems.
    > > > >
    > > > > We haven't been able to duplicate these Hang's on our local development
    > > > > machines (XP Pro, Visual Studio 2005, .Net Framework 2.0 app)
    > > > >
    > > > > I've seen some other postings that said that the "Smart Navigation" setting
    > > > > was the culprit but I can't find any evidence of "Smart Navigation" code in
    > > > > the source of the page (but I might not be looking at the right thing).
    > > > >
    > > > > Has anyone else seen this?
    =?Utf-8?B?d2ViZ3V5QGNvbW11bml0eS5ub3NwYW0=?=, Jan 26, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    2
    Views:
    7,962
    Charles A. Lackman
    Jan 11, 2006
  2. =?Utf-8?B?VHJveQ==?=

    Response.redirect does not redirect from .aspx page

    =?Utf-8?B?VHJveQ==?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,206
    Srowe1975
    Oct 15, 2008
  3. Sal
    Replies:
    1
    Views:
    358
  4. Ron Howard
    Replies:
    2
    Views:
    499
    Ron Howard
    Aug 11, 2004
  5. Tim Shadel

    Gem hangs => TCPSocket.write hangs

    Tim Shadel, Jul 23, 2005, in forum: Ruby
    Replies:
    1
    Views:
    365
    Ville Mattila
    Jul 24, 2005
Loading...

Share This Page