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

Help ThreadAbortException for Response.Redirect!

I have a default.aspx page that simply does this (in the "Try" block):
Response.Redirect("MyStartPage.aspx")

I keep getting this exception on this line:
"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 System.Web.HttpResponse.Redirect(String url)
at MyWeb._default1.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\MyWeb\default.aspx.vb:line 22"

Any ideas?
Nov 17 '05 #1
1 2362

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:e0**************@TK2MSFTNGP10.phx.gbl...
I have a default.aspx page that simply does this (in the "Try" block):
Response.Redirect("MyStartPage.aspx")

I keep getting this exception on this line:
"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 System.Web.HttpResponse.Redirect(String url)
at MyWeb._default1.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\MyWeb\default.aspx.vb:line 22"

Any ideas?


Response.End and Response.Redirect are implemented using
ThreadAbortExceptions. That's how they stop the execution of the page
object. Remember you not only have to exit from Page_Load, you have to stop
any of the other Page methods from firint.

It's just a gotcha that if you catch the exception, it looks like something
is wrong.

David
Nov 17 '05 #2

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

Similar topics

1
by: Naveen Kumar soni | last post by:
Hi we are getting ThreadAbortException error message on one of our .net(1.1) server. The error is get displayed in one of .aspx page, which is having response.redirect statement, if this page is...
3
by: Steve - DND | last post by:
I just implemented a page that performs a Response.Redirect(url, true). As such, I wrapped it in a try catch, and explicitly caught a ThreadAbortException. However, the thread abort exception was...
4
by: splap20 | last post by:
Every day a large chunk of XML is posted up to my app via http. The app interprets this XML and writes results to a SQLServer. Occasionally a ThreadAbortException is thrown during this process....
1
by: MikeM | last post by:
We are getting a behavior on a Response.Redirect("SomeUrl", True) that I'm hoping someone can explain. This all refers to the code snip at the end. By the way, this is all VB ASP.NET v1.0 code. ...
1
by: Eric | last post by:
I have the following situation: I was getting intermittent errors using Reponse.Redirct("url", true) and was trying to catch the ThreadAbortException, but it was not staying caught and was showing...
1
by: Mike Hofer | last post by:
I really need some help, and I'd appreciate any that you folks can provide. The ASP.NET application in question uses version 1.1 of the .NET Framework. All of the pages use a common base class...
5
by: dorrit.Riemenschneider | last post by:
I've developed a sharepint webpart (ASP.NET 2.0 application) with use of the CrystalReportViewer web control (CrystalDecisions.Web.CrystalReportViewer). All works fine except the export of the...
1
by: mwallis76 | last post by:
Upon clicking on a hyperlink generated in a ASP.NET GridView control, I am finding Firefox 1.5 to crash. However, when clicking on the same link, Internet Explorer 6.0 works just fine and is...
2
by: Zeba | last post by:
Hi ! I am using a httphandler to perform some url rewriting in my application. My web.config contains the following entry to direct all urls containing /App/*.ashx to my class AppHandler.cs in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.