473,399 Members | 2,478 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,399 software developers and data experts.

Response.Redirect not working

I get an error - any help appreciated.

System.Threading.ThreadAbortException: Thread was being aborted. at
System.Threading.Thread.AbortInternal() at
System.Threading.Thread.Abort(Object stateInfo) at
System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url,
Boolean endResponse) at
WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object sender,
EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150
Nov 19 '05 #1
10 9466
Yeah, You can ignore this exception. It's how it's implemented.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I get an error - any help appreciated.

System.Threading.ThreadAbortException: Thread was being aborted. at
System.Threading.Thread.AbortInternal() at
System.Threading.Thread.Abort(Object stateInfo) at
System.Web.HttpResponse.End() at
System.Web.HttpResponse.Redirect(String url, Boolean endResponse) at
WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150


Nov 19 '05 #2
Thanks but I get a blank white page.

"Brock Allen" wrote:
Yeah, You can ignore this exception. It's how it's implemented.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I get an error - any help appreciated.

System.Threading.ThreadAbortException: Thread was being aborted. at
System.Threading.Thread.AbortInternal() at
System.Threading.Thread.Abort(Object stateInfo) at
System.Web.HttpResponse.End() at
System.Web.HttpResponse.Redirect(String url, Boolean endResponse) at
WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150


Nov 19 '05 #3
What is your catch block doing?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks but I get a blank white page.

"Brock Allen" wrote:
Yeah, You can ignore this exception. It's how it's implemented.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I get an error - any help appreciated.

System.Threading.ThreadAbortException: Thread was being aborted. at
System.Threading.Thread.AbortInternal() at
System.Threading.Thread.Abort(Object stateInfo) at
System.Web.HttpResponse.End() at
System.Web.HttpResponse.Redirect(String url, Boolean endResponse) at
WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150


Nov 19 '05 #4
Are you Response.Redirecting inside a try/catch?

You probably need to modify your Response.Redirect to be like this

Response.Redirect("redirec.aspx", false)

The "false" tells it to wait to finish the execution of the current request
before doing the Redirect.

Hope this helps,

Chris
"Niggy" wrote:
I get an error - any help appreciated.

System.Threading.ThreadAbortException: Thread was being aborted. at
System.Threading.Thread.AbortInternal() at
System.Threading.Thread.Abort(Object stateInfo) at
System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url,
Boolean endResponse) at
WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object sender,
EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150

Nov 19 '05 #5
I have tried Response.Redirect("index.htm", false) and have taken the code
out of a try catch statement, but I get no response or a blank page.

"Chris" wrote:
Are you Response.Redirecting inside a try/catch?

You probably need to modify your Response.Redirect to be like this

Response.Redirect("redirec.aspx", false)

The "false" tells it to wait to finish the execution of the current request
before doing the Redirect.

Hope this helps,

Chris
"Niggy" wrote:
I get an error - any help appreciated.

System.Threading.ThreadAbortException: Thread was being aborted. at
System.Threading.Thread.AbortInternal() at
System.Threading.Thread.Abort(Object stateInfo) at
System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url,
Boolean endResponse) at
WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object sender,
EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150

Nov 19 '05 #6
Hmmm.

This is indeed perplexing. Can you post the method/function that you have
this code in? I'd like to try it out in my dev environment and see if I can
find something.

Chris

"Niggy" <Ni***@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
I have tried Response.Redirect("index.htm", false) and have taken the code
out of a try catch statement, but I get no response or a blank page.

"Chris" wrote:
Are you Response.Redirecting inside a try/catch?

You probably need to modify your Response.Redirect to be like this

Response.Redirect("redirec.aspx", false)

The "false" tells it to wait to finish the execution of the current
request
before doing the Redirect.

Hope this helps,

Chris
"Niggy" wrote:
> I get an error - any help appreciated.
>
> System.Threading.ThreadAbortException: Thread was being aborted. at
> System.Threading.Thread.AbortInternal() at
> System.Threading.Thread.Abort(Object stateInfo) at
> System.Web.HttpResponse.End() at
> System.Web.HttpResponse.Redirect(String url,
> Boolean endResponse) at
> WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object
> sender,
> EventArgs e) in
> c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150

Nov 19 '05 #7
I have a DDL with Text and Value populated by a database. An example value
entry would be "../4900/Framework.doc". The code is:

Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DropDownList1.SelectedIndexChanged

Dim sumfin As String = DropDownList1.SelectedValue.ToString
Dim pos As Integer = sumfin.Length
Dim bString As String = sumfin.Substring(3, pos - 3))
Dim cString As String=http://localhost/ & bString
Response.Redirect(cString)

End Sub

Hope you can come up with an answer. Thanks.

"Chris Hayes" wrote:
Hmmm.

This is indeed perplexing. Can you post the method/function that you have
this code in? I'd like to try it out in my dev environment and see if I can
find something.

Chris

"Niggy" <Ni***@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
I have tried Response.Redirect("index.htm", false) and have taken the code
out of a try catch statement, but I get no response or a blank page.

"Chris" wrote:
Are you Response.Redirecting inside a try/catch?

You probably need to modify your Response.Redirect to be like this

Response.Redirect("redirec.aspx", false)

The "false" tells it to wait to finish the execution of the current
request
before doing the Redirect.

Hope this helps,

Chris
"Niggy" wrote:

> I get an error - any help appreciated.
>
> System.Threading.ThreadAbortException: Thread was being aborted. at
> System.Threading.Thread.AbortInternal() at
> System.Threading.Thread.Abort(Object stateInfo) at
> System.Web.HttpResponse.End() at
> System.Web.HttpResponse.Redirect(String url,
> Boolean endResponse) at
> WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object
> sender,
> EventArgs e) in
> c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150


Nov 19 '05 #8
Well, I'm not quite sure what's causing your Response.Redirect problem... I
took your code as a base (I had to tweak it a little bit) but it works just
fine...

Here's the tweaked code:
Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DropDownList1.SelectedIndexChanged

Dim sumfin As String = DropDownList1.SelectedValue.ToString()

Dim pos As Integer = sumfin.Length

Dim bString As String = sumfin.Substring(3, pos - 3)

Dim cString As String = "http://localhost/" & bString

Response.Redirect(cString)

End Sub
"Niggy" <Ni***@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
I have a DDL with Text and Value populated by a database. An example value
entry would be "../4900/Framework.doc". The code is:

Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DropDownList1.SelectedIndexChanged

Dim sumfin As String = DropDownList1.SelectedValue.ToString
Dim pos As Integer = sumfin.Length
Dim bString As String = sumfin.Substring(3, pos - 3))
Dim cString As String=http://localhost/ & bString
Response.Redirect(cString)

End Sub

Hope you can come up with an answer. Thanks.

"Chris Hayes" wrote:
Hmmm.

This is indeed perplexing. Can you post the method/function that you have
this code in? I'd like to try it out in my dev environment and see if I
can
find something.

Chris

"Niggy" <Ni***@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
>I have tried Response.Redirect("index.htm", false) and have taken the
>code
> out of a try catch statement, but I get no response or a blank page.
>
> "Chris" wrote:
>
>> Are you Response.Redirecting inside a try/catch?
>>
>> You probably need to modify your Response.Redirect to be like this
>>
>> Response.Redirect("redirec.aspx", false)
>>
>> The "false" tells it to wait to finish the execution of the current
>> request
>> before doing the Redirect.
>>
>> Hope this helps,
>>
>> Chris
>>
>>
>> "Niggy" wrote:
>>
>> > I get an error - any help appreciated.
>> >
>> > System.Threading.ThreadAbortException: Thread was being aborted. at
>> > System.Threading.Thread.AbortInternal() at
>> > System.Threading.Thread.Abort(Object stateInfo) at
>> > System.Web.HttpResponse.End() at
>> > System.Web.HttpResponse.Redirect(String url,
>> > Boolean endResponse) at
>> > WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object
>> > sender,
>> > EventArgs e) in
>> > c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150


Nov 19 '05 #9
I've been seeing the same problem on a few of our projects, and don't know
the actual cause. I do have my suspicions that it is a cache problem in IIS.

Occasionally a page calling Repose.Redirect will just sit there with the old
URL in the location bar, and display a blank page. Sometime later it will
(usually) start to work properly. It happens intermittently. A page will
sometimes stop working for a few hours, then start working again, with no
apparent reason for stopping or starting back up.

All attempts at debugging it on the application side have failed, and I
don't really care for our people to spend time debugging into IIS to find yet
another Microsoft bug -- I'm tired of us spending developer salaries to give
MS more free bug reports.

It seems to happen more frequently (and vanish more quickly) on the SSL
production site. Also, it happens frequently when a developer changes a page
or the code behind it on the dev machines, although in that case we have a
possible reason for the problem -- and a possible cache coherency issue.

Bryan Wagstaff
Lead Programmer

"Chris Hayes" wrote:
Well, I'm not quite sure what's causing your Response.Redirect problem... I
took your code as a base (I had to tweak it a little bit) but it works just
fine...

Nov 19 '05 #10
Hi Niggy,

I got a workaround to get over this. What I did was instead of running it
from the called procedure, I created a statement in calling procedure (that
is btn1_click event). And it started working.

Raj

"Niggy" wrote:
I get an error - any help appreciated.

System.Threading.ThreadAbortException: Thread was being aborted. at
System.Threading.Thread.AbortInternal() at
System.Threading.Thread.Abort(Object stateInfo) at
System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url,
Boolean endResponse) at
WebApplication1.WebForm4.DropDownList1_SelectedInd exChanged(Object sender,
EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebForm4.aspx.v b:line 150

Nov 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bill | last post by:
I have a page that contains processed variables that I'd like to forward using the response.redirect method. However, because the response.redirect contains the page within "pagename.asp", I have...
3
by: Justin | last post by:
Hi, Im confused here over the usage of Response.Redirect and Server.Transfer. I used frameset for my work, what are the proper usages of the two methods that seems working similar.. The...
5
by: john | last post by:
Hello, One our thrid page for some reason the response.redirect isn't working on the live server. It works fine on the development machine but when we move the code to the live server it doesn't...
1
by: Sospeter | last post by:
Hi Ken, I have done that but still experiencing same problem. Tried the following i.e. turning smartnavigation = false and using server.transfer as below but nothing works. Please help. ...
14
by: gaurav tyagi | last post by:
in my appplication if i try to go to next page using response.redirect, it does not work and control remains on same page but if i use server.transfer control goes to nex page?? can any one...
3
by: Marc Hoeijmans | last post by:
Hello, I have a problem with the Response.Redirect. The redirect is working for some users for other useres it is not working. We all use the same browser. I have coded the Response.Redirect after...
5
by: ODAN | last post by:
We are testing a ASP.NET application in Visual Studion 2003 and written in C#. One of the pages that register new users on this application fails to redirect to another page when the button is...
4
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches....
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.