By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,389 Members | 2,044 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,389 IT Pros & Developers. It's quick & easy.

Response.Redirect Hangs

P: n/a
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?
Jan 25 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a

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

--
Jerry J
"we****@community.nospam" 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?
Jan 25 '07 #2

P: n/a
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
"we****@community.nospam" 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?
Jan 25 '07 #3

P: n/a
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
"we****@community.nospam" 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?
Jan 25 '07 #4

P: n/a
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.

"we****@community.nospam" 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
"we****@community.nospam" 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?
Jan 25 '07 #5

P: n/a
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.
"Ea******@HighFlyingBirds.com" 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.

"we****@community.nospam" 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
>
>
"we****@community.nospam" 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?
Jan 26 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.