Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Response.Redirect not working

Reply
Thread Tools

Response.Redirect not working

 
 
=?Utf-8?B?TmlnZ3k=?=
Guest
Posts: n/a
 
      07-26-2005
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
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      07-26-2005
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
>




 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmlnZ3k=?=
Guest
Posts: n/a
 
      07-26-2005
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
> >

>
>
>
>

 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      07-27-2005
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
>>>




 
Reply With Quote
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      07-27-2005
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

 
Reply With Quote
 
=?Utf-8?B?TmlnZ3k=?=
Guest
Posts: n/a
 
      07-27-2005
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

 
Reply With Quote
 
Chris Hayes
Guest
Posts: n/a
 
      07-28-2005
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" <> wrote in message
news:F2B49D44-BBCC-4E14-A41F-...
>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



 
Reply With Quote
 
=?Utf-8?B?TmlnZ3k=?=
Guest
Posts: n/a
 
      07-28-2005
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" <> wrote in message
> news:F2B49D44-BBCC-4E14-A41F-...
> >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

>
>
>

 
Reply With Quote
 
Chris Hayes
Guest
Posts: n/a
 
      07-29-2005
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" <> wrote in message
news:1EE23F25-A5DA-440B-92DA-...
>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" <> wrote in message
>> news:F2B49D44-BBCC-4E14-A41F-...
>> >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

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QnJ5YW4gV2Fnc3RhZmY=?=
Guest
Posts: n/a
 
      07-29-2005
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...



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
response.redirect is not working but server.transfer is working gaurav tyagi ASP .Net 14 01-20-2006 04:22 AM
wifi not working on new hp, or not working after live update =?Utf-8?B?RHJhZ29ueA==?= Wireless Networking 1 10-01-2005 11:17 PM
ASP.NET client-side validation working, but button click not working Alan Silver ASP .Net 1 08-02-2005 03:50 PM
Cookies working on intranet but NOT working on Internet Martin Heuckeroth ASP .Net 5 04-01-2005 01:37 AM
Regular Expression validators NOT working, Required Field validators ARE working Ratman ASP .Net 0 09-14-2004 09:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57