Ask a Question related to ASP.NET General, Design and Development.
-
jeff #1
Re: bizaar exception that isn't really an exception
well, threadabortexception didn't mention anything about response.redirect,
that's why i didn't see anything.
but, thanks for the info, that would explain it... sort of... why doesn't
this exception get caught in the debugger? ie, break on all errors is
selected, but this error isn't caught.
jeff
"Scott" <scoonce@thegapJUNKcompany.com> wrote in message
news:uRW6C3gODHA.1024@TK2MSFTNGP12.phx.gbl...> As Jason said: take a look at ThreadAbortException (and also
> response.redirect).
>
> The following are taken from the MSDN Help:
>
> HttpResponse.Redirect(string):
> Redirect calls End which raises a ThreadAbortException exception upon
> completion.
>
> ThreadAbortException:
> When a call is made to the Abort method to destroy a thread, the
> common language runtime throws a ThreadAbortException.
> ThreadAbortException is a special exception that can be caught, but it
> will automatically be raised again at the end of the catch block.
>
> I hope that helps.
> Scott
>
> "jeff" <vader1000x@yahoo.com> wrote in message
> news:OE7CIqdODHA.2480@tk2msftngp13.phx.gbl...> happening.> > happens when you issue thread.abort on a thread. this isn't> ThreadAbortException and> > it's a single thread and nowhere do i do any thread controls.
> >
> > jeff
> >
> > "Jason" <123456789clopper@totalise.co.uk987654321> wrote in message
> > news:e6gmIfdODHA.2636@TK2MSFTNGP10.phx.gbl...> > > no offense here but you really should read up on> had a> > > its siblings
> > >
> > >
> > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > news:uZcMStbODHA.3192@TK2MSFTNGP10.phx.gbl...
> > > > i am using asp .net 1.1. i am having a very strange problem. i> i> > > batch
> > > > of code that was working great. i made a couple of changes and> the code> > noticed> > > it
> > > > was always throwing an exception. i worked on it and below is> thing -> > in> > > > the event that causes the pseudo exception. here is the strange> whether it is> > i> > > > have my debugger set to break on all errors regardless of> exception> > > > handled or not. it never breaks into the debugger. the> because> > > reported
> > > > is "thread is aborting" or something like that. this is bogus> this was a> > i'm> > > > not running a multi-threaded app! so, since i was convinced> try/catch> > > > bogus error, i moved the response.redirect outside of the> code> > block> > > > and it worked fine. can anybody explain this to me? also, this> Page,> > used> > > > to work fine.
> > > >
> > > > ' try to get data
> > > > Try
> > > >
> > > > ' if made it this far, redirect to the report page.
> > > >
> > > > Response.Redirect("report.aspx")
> > > >
> > > > Catch ex As Exception
> > > >
> > > > ' set error condition to prompt user
> > > >
> > > > Session.Item(clsConstants.clsSession.MAIN_ERROR) = True
> > > >
> > > > Session.Item(clsConstants.clsSession.EXCEPTION) = ex
> > > >
> > > > DisplayError(Session.Item(clsConstants.clsSession. EXCEPTION),>> > True)> >> > > >
> > > > End Try
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
>
jeff Guest
-
The server threw an exception. (Exception
I am getting The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) When i try to open any file using Adobe ... -
#32101 [Com]: Exception in unknown on line 0 when throwing exception inside exception handler
ID: 32101 Comment by: dhopkins at DonHopkins dot com Reported By: ceefour at gauldong dot net Status: No... -
SoapExtension for Global Exception handling; but prevent exception from propagating!!
Hi, I wrote a SoapExtension for Global Exception handling in Webservice and it works!!!! Now i want to catch the exception that happen in the... -
ASP catch exception
I use the following code and get the following error message in my ASP page(not .net). Please help try mycode Catch ex As Exception... -
Strange exception ??
Greatings. We are developint an application using struts on linux. We run a db2 server (v8.1) on linux. When trying to access using JDBC drivers I... -
jeff #2
Re: bizaar exception that isn't really an exception
another interesting thought... why can i put this outside a try/catch and it
doesn't blow things up? if it raises an exception, the code doesn't seem to
care...
jeff
"Scott" <scoonce@thegapJUNKcompany.com> wrote in message
news:uRW6C3gODHA.1024@TK2MSFTNGP12.phx.gbl...> As Jason said: take a look at ThreadAbortException (and also
> response.redirect).
>
> The following are taken from the MSDN Help:
>
> HttpResponse.Redirect(string):
> Redirect calls End which raises a ThreadAbortException exception upon
> completion.
>
> ThreadAbortException:
> When a call is made to the Abort method to destroy a thread, the
> common language runtime throws a ThreadAbortException.
> ThreadAbortException is a special exception that can be caught, but it
> will automatically be raised again at the end of the catch block.
>
> I hope that helps.
> Scott
>
> "jeff" <vader1000x@yahoo.com> wrote in message
> news:OE7CIqdODHA.2480@tk2msftngp13.phx.gbl...> happening.> > happens when you issue thread.abort on a thread. this isn't> ThreadAbortException and> > it's a single thread and nowhere do i do any thread controls.
> >
> > jeff
> >
> > "Jason" <123456789clopper@totalise.co.uk987654321> wrote in message
> > news:e6gmIfdODHA.2636@TK2MSFTNGP10.phx.gbl...> > > no offense here but you really should read up on> had a> > > its siblings
> > >
> > >
> > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > news:uZcMStbODHA.3192@TK2MSFTNGP10.phx.gbl...
> > > > i am using asp .net 1.1. i am having a very strange problem. i> i> > > batch
> > > > of code that was working great. i made a couple of changes and> the code> > noticed> > > it
> > > > was always throwing an exception. i worked on it and below is> thing -> > in> > > > the event that causes the pseudo exception. here is the strange> whether it is> > i> > > > have my debugger set to break on all errors regardless of> exception> > > > handled or not. it never breaks into the debugger. the> because> > > reported
> > > > is "thread is aborting" or something like that. this is bogus> this was a> > i'm> > > > not running a multi-threaded app! so, since i was convinced> try/catch> > > > bogus error, i moved the response.redirect outside of the> code> > block> > > > and it worked fine. can anybody explain this to me? also, this> Page,> > used> > > > to work fine.
> > > >
> > > > ' try to get data
> > > > Try
> > > >
> > > > ' if made it this far, redirect to the report page.
> > > >
> > > > Response.Redirect("report.aspx")
> > > >
> > > > Catch ex As Exception
> > > >
> > > > ' set error condition to prompt user
> > > >
> > > > Session.Item(clsConstants.clsSession.MAIN_ERROR) = True
> > > >
> > > > Session.Item(clsConstants.clsSession.EXCEPTION) = ex
> > > >
> > > > DisplayError(Session.Item(clsConstants.clsSession. EXCEPTION),>> > True)> >> > > >
> > > > End Try
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
>
jeff Guest
-
jeff #3
Re: bizaar exception that isn't really an exception
i already changed my code to catch the threadabortexception and just do
nothing with it.... thanks.
jeff
"Scott" <scoonce@thegapJUNKcompany.com> wrote in message
news:eLWDzltODHA.2160@TK2MSFTNGP11.phx.gbl...> Jeff,
>
> This is _only_ my view of things, maybe some MS person or other more
> knowing person has a better answer, but I'll explain the way that I
> see these things.
>
> Each request is handled by "your application" (the aspnet_wp.exe
> process). When a new request comes in, the process creates a new
> thread to handle the request. For me, this is why, when the
> threadabort exception is thrown in this thread, there is nothing to
> blow up, except the thread, and it dies anyway. Response.Redirect()
> must be a bit fancy though, since, even to me, it seems to be killing
> the very thread it is running on, but no matter. Ignore this detail.
>
> About catching the error: this i do all the time. As it said in the
> ThreadAbortException help though, the exception is rethrown
> immediately after the catch block, so if you had something like the
> following:
>
> // handles pageload event
> private void Page_Load(object, args) {
> // do some stuff
> try { Response.Redirect([url]http://www.thegameoflife.com[/url]) }
> catch (Exception ex) {
> Console.WriteLine(ex.GetType().ToString(); }
> }
>
> the exception would be caught and
> "System.Threading.ThreadAbortException" should (I haven't tried it
> lately) be written to the output window. Note that if you do a
> Response.Write(ex.Message) it will work, but is meaningless since the
> response is redirected, and therefore cleared. In general I would
> avoid having a Response.Redirect() inside a try/catch, because you
> always know it's going to throw an exception and, as the gurus tell
> us, throwing & catching the exceptions has a bit of performance
> overhead.
>
> Let me know if that clear things up or makes them more confusing.
> scott
>
> "jeff" <vader1000x@yahoo.com> wrote in message
> news:u3QgC9kODHA.3880@tk2msftngp13.phx.gbl...> try/catch and it> > another interesting thought... why can i put this outside a> seem to> > doesn't blow things up? if it raises an exception, the code doesn't> upon> > care...
> >
> > jeff
> >
> > "Scott" <scoonce@thegapJUNKcompany.com> wrote in message
> > news:uRW6C3gODHA.1024@TK2MSFTNGP12.phx.gbl...> > > As Jason said: take a look at ThreadAbortException (and also
> > > response.redirect).
> > >
> > > The following are taken from the MSDN Help:
> > >
> > > HttpResponse.Redirect(string):
> > > Redirect calls End which raises a ThreadAbortException exception> but it> > > completion.
> > >
> > > ThreadAbortException:
> > > When a call is made to the Abort method to destroy a thread, the
> > > common language runtime throws a ThreadAbortException.
> > > ThreadAbortException is a special exception that can be caught,> message> > > will automatically be raised again at the end of the catch block.
> > >
> > > I hope that helps.
> > > Scott
> > >
> > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > news:OE7CIqdODHA.2480@tk2msftngp13.phx.gbl...
> > > > happens when you issue thread.abort on a thread. this isn't
> > > happening.
> > > > it's a single thread and nowhere do i do any thread controls.
> > > >
> > > > jeff
> > > >
> > > > "Jason" <123456789clopper@totalise.co.uk987654321> wrote in> problem. i> > > > news:e6gmIfdODHA.2636@TK2MSFTNGP10.phx.gbl...
> > > > > no offense here but you really should read up on
> > > ThreadAbortException and
> > > > > its siblings
> > > > >
> > > > >
> > > > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > > > news:uZcMStbODHA.3192@TK2MSFTNGP10.phx.gbl...
> > > > > > i am using asp .net 1.1. i am having a very strange> and> > > had a
> > > > > batch
> > > > > > of code that was working great. i made a couple of changes> is> > > i
> > > > noticed
> > > > > it
> > > > > > was always throwing an exception. i worked on it and below> strange> > > the code
> > > > in
> > > > > > the event that causes the pseudo exception. here is the> bogus> > > thing -
> > > > i
> > > > > > have my debugger set to break on all errors regardless of
> > > whether it is
> > > > > > handled or not. it never breaks into the debugger. the
> > > exception
> > > > > reported
> > > > > > is "thread is aborting" or something like that. this is> this> > > because
> > > > i'm
> > > > > > not running a multi-threaded app! so, since i was convinced
> > > this was a
> > > > > > bogus error, i moved the response.redirect outside of the
> > > try/catch
> > > > block
> > > > > > and it worked fine. can anybody explain this to me? also,> DisplayError(Session.Item(clsConstants.clsSession. EXCEPTION),> > > code
> > > > used
> > > > > > to work fine.
> > > > > >
> > > > > > ' try to get data
> > > > > > Try
> > > > > >
> > > > > > ' if made it this far, redirect to the report page.
> > > > > >
> > > > > > Response.Redirect("report.aspx")
> > > > > >
> > > > > > Catch ex As Exception
> > > > > >
> > > > > > ' set error condition to prompt user
> > > > > >
> > > > > > Session.Item(clsConstants.clsSession.MAIN_ERROR) = True
> > > > > >
> > > > > > Session.Item(clsConstants.clsSession.EXCEPTION) = ex
> > > > > >
> > > > > >>> >> > > Page,
> > > > True)
> > > > > >
> > > > > > End Try
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
jeff Guest
-
Jason #4
Re: bizaar exception that isn't really an exception
Scott
That makes for a slow exception handler. Probably quicker to catch it.
Besides - that is a very Vb specific command. There is no C# equivalent
other than coding that When statement in the block. Would be interesting to
see the MSIL on that one - its going to be in the exception handling block
in any case i am sure.
Cheers
Jason
"Scott" <scoonce@thegapJUNKcompany.com> wrote in message
news:ebiA295ODHA.3152@TK2MSFTNGP10.phx.gbl...> jeff,
>
> Somewhere deep in the mysterious jungle of the MS help, they recommend
> to do nothing with an exception unless you are going to handle it. In
> the case of just try (response.redirect) catch (do nothing), it does
> not make sense to catch the exception. That said, it doesn't really
> hurt. Here's another something I stumbled on recently:
>
> Try
> 'do some stuff
> Response.Redirect("foo.aspx")
> Catch ex As Exception When Not TypeOf ex Is ThreadAbortException
> 'handle other kinds of exceptions
> End Try
>
> Hope that helps,
> scott
>
> "jeff" <vader1000x@yahoo.com> wrote in message
> news:%231JSja1ODHA.4024@tk2msftngp13.phx.gbl...> do> > i already changed my code to catch the threadabortexception and just> more> > nothing with it.... thanks.
> >
> > jeff
> >
> > "Scott" <scoonce@thegapJUNKcompany.com> wrote in message
> > news:eLWDzltODHA.2160@TK2MSFTNGP11.phx.gbl...> > > Jeff,
> > >
> > > This is _only_ my view of things, maybe some MS person or other> I> > > knowing person has a better answer, but I'll explain the way that> to> > > see these things.
> > >
> > > Each request is handled by "your application" (the aspnet_wp.exe
> > > process). When a new request comes in, the process creates a new
> > > thread to handle the request. For me, this is why, when the
> > > threadabort exception is thrown in this thread, there is nothing> Response.Redirect()> > > blow up, except the thread, and it dies anyway.> killing> > > must be a bit fancy though, since, even to me, it seems to be> detail.> > > the very thread it is running on, but no matter. Ignore this> the> > >
> > > About catching the error: this i do all the time. As it said in> the> > > ThreadAbortException help though, the exception is rethrown
> > > immediately after the catch block, so if you had something like> the> > > following:
> > >
> > > // handles pageload event
> > > private void Page_Load(object, args) {
> > > // do some stuff
> > > try { Response.Redirect([url]http://www.thegameoflife.com[/url]) }
> > > catch (Exception ex) {
> > > Console.WriteLine(ex.GetType().ToString(); }
> > > }
> > >
> > > the exception would be caught and
> > > "System.Threading.ThreadAbortException" should (I haven't tried it
> > > lately) be written to the output window. Note that if you do a
> > > Response.Write(ex.Message) it will work, but is meaningless since> tell> > > response is redirected, and therefore cleared. In general I would
> > > avoid having a Response.Redirect() inside a try/catch, because you
> > > always know it's going to throw an exception and, as the gurus> doesn't> > > us, throwing & catching the exceptions has a bit of performance
> > > overhead.
> > >
> > > Let me know if that clear things up or makes them more confusing.
> > > scott
> > >
> > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > news:u3QgC9kODHA.3880@tk2msftngp13.phx.gbl...
> > > > another interesting thought... why can i put this outside a
> > > try/catch and it
> > > > doesn't blow things up? if it raises an exception, the code> exception> > > seem to
> > > > care...
> > > >
> > > > jeff
> > > >
> > > > "Scott" <scoonce@thegapJUNKcompany.com> wrote in message
> > > > news:uRW6C3gODHA.1024@TK2MSFTNGP12.phx.gbl...
> > > > > As Jason said: take a look at ThreadAbortException (and also
> > > > > response.redirect).
> > > > >
> > > > > The following are taken from the MSDN Help:
> > > > >
> > > > > HttpResponse.Redirect(string):
> > > > > Redirect calls End which raises a ThreadAbortException> the> > > upon
> > > > > completion.
> > > > >
> > > > > ThreadAbortException:
> > > > > When a call is made to the Abort method to destroy a thread,> caught,> > > > > common language runtime throws a ThreadAbortException.
> > > > > ThreadAbortException is a special exception that can be> block.> > > but it
> > > > > will automatically be raised again at the end of the catch> controls.> > > > >
> > > > > I hope that helps.
> > > > > Scott
> > > > >
> > > > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > > > news:OE7CIqdODHA.2480@tk2msftngp13.phx.gbl...
> > > > > > happens when you issue thread.abort on a thread. this isn't
> > > > > happening.
> > > > > > it's a single thread and nowhere do i do any thread> changes> > > > > >
> > > > > > jeff
> > > > > >
> > > > > > "Jason" <123456789clopper@totalise.co.uk987654321> wrote in
> > > message
> > > > > > news:e6gmIfdODHA.2636@TK2MSFTNGP10.phx.gbl...
> > > > > > > no offense here but you really should read up on
> > > > > ThreadAbortException and
> > > > > > > its siblings
> > > > > > >
> > > > > > >
> > > > > > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > > > > > news:uZcMStbODHA.3192@TK2MSFTNGP10.phx.gbl...
> > > > > > > > i am using asp .net 1.1. i am having a very strange
> > > problem. i
> > > > > had a
> > > > > > > batch
> > > > > > > > of code that was working great. i made a couple of> below> > > and
> > > > > i
> > > > > > noticed
> > > > > > > it
> > > > > > > > was always throwing an exception. i worked on it and> of> > > is
> > > > > the code
> > > > > > in
> > > > > > > > the event that causes the pseudo exception. here is the
> > > strange
> > > > > thing -
> > > > > > i
> > > > > > > > have my debugger set to break on all errors regardless> convinced> > > > > whether it is
> > > > > > > > handled or not. it never breaks into the debugger. the
> > > > > exception
> > > > > > > reported
> > > > > > > > is "thread is aborting" or something like that. this is
> > > bogus
> > > > > because
> > > > > > i'm
> > > > > > > > not running a multi-threaded app! so, since i was> the> > > > > this was a
> > > > > > > > bogus error, i moved the response.redirect outside of> also,> > > > > try/catch
> > > > > > block
> > > > > > > > and it worked fine. can anybody explain this to me?>> >> > > this
> > > > > code
> > > > > > used
> > > > > > > > to work fine.
> > > > > > > >
> > > > > > > > ' try to get data
> > > > > > > > Try
> > > > > > > >
> > > > > > > > ' if made it this far, redirect to the report page.
> > > > > > > >
> > > > > > > > Response.Redirect("report.aspx")
> > > > > > > >
> > > > > > > > Catch ex As Exception
> > > > > > > >
> > > > > > > > ' set error condition to prompt user
> > > > > > > >
> > > > > > > > Session.Item(clsConstants.clsSession.MAIN_ERROR) = True
> > > > > > > >
> > > > > > > > Session.Item(clsConstants.clsSession.EXCEPTION) = ex
> > > > > > > >
> > > > > > > >
> > > DisplayError(Session.Item(clsConstants.clsSession. EXCEPTION),
> > > > > Page,
> > > > > > True)
> > > > > > > >
> > > > > > > > End Try
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Jason Guest
-
Scott #5
Re: bizaar exception that isn't really an exception
Jason,
Yes I agree. I wrote in VB for about 6 months, got comfortable with
the framework, then switched to c#. (I actually had to look up the
exact syntax for the When clause in old code.)
I prefer setting a flag in the catch for stuff like that now. I would
do
Dim flag as Boolean
Try
'some stuff
flag = true
Catch ex As Exception
'exception handling code
flag = false
End Try
If flag Then Response.Redirect("")
for example. I would be interested in something a bit more elegate
though.
Scott
"Jason" <123456789clopper@totalise.co.uk987654321> wrote in message
news:eryTw39ODHA.2636@TK2MSFTNGP10.phx.gbl...it.> Scott
>
> That makes for a slow exception handler. Probably quicker to catchequivalent> Besides - that is a very Vb specific command. There is no C#interesting to> other than coding that When statement in the block. Would beblock> see the MSIL on that one - its going to be in the exception handlingrecommend> in any case i am sure.
>
> Cheers
>
> Jason
>
>
>
> "Scott" <scoonce@thegapJUNKcompany.com> wrote in message
> news:ebiA295ODHA.3152@TK2MSFTNGP10.phx.gbl...> > jeff,
> >
> > Somewhere deep in the mysterious jungle of the MS help, theyIn> > to do nothing with an exception unless you are going to handle it.does> > the case of just try (response.redirect) catch (do nothing), itreally> > not make sense to catch the exception. That said, it doesn'tjust> > hurt. Here's another something I stumbled on recently:
> >
> > Try
> > 'do some stuff
> > Response.Redirect("foo.aspx")
> > Catch ex As Exception When Not TypeOf ex Is ThreadAbortException
> > 'handle other kinds of exceptions
> > End Try
> >
> > Hope that helps,
> > scott
> >
> > "jeff" <vader1000x@yahoo.com> wrote in message
> > news:%231JSja1ODHA.4024@tk2msftngp13.phx.gbl...> > > i already changed my code to catch the threadabortexception andother> > do> > > nothing with it.... thanks.
> > >
> > > jeff
> > >
> > > "Scott" <scoonce@thegapJUNKcompany.com> wrote in message
> > > news:eLWDzltODHA.2160@TK2MSFTNGP11.phx.gbl...
> > > > Jeff,
> > > >
> > > > This is _only_ my view of things, maybe some MS person orthat> > more> > > > knowing person has a better answer, but I'll explain the wayaspnet_wp.exe> > I> > > > see these things.
> > > >
> > > > Each request is handled by "your application" (thenew> > > > process). When a new request comes in, the process creates anothing> > > > thread to handle the request. For me, this is why, when the
> > > > threadabort exception is thrown in this thread, there isin> > to> > Response.Redirect()> > > > blow up, except the thread, and it dies anyway.> > killing> > > > must be a bit fancy though, since, even to me, it seems to be> > detail.> > > > the very thread it is running on, but no matter. Ignore this> > > >
> > > > About catching the error: this i do all the time. As it saidlike> > the> > > > ThreadAbortException help though, the exception is rethrown
> > > > immediately after the catch block, so if you had somethingtried it> > the> > > > following:
> > > >
> > > > // handles pageload event
> > > > private void Page_Load(object, args) {
> > > > // do some stuff
> > > > try { Response.Redirect([url]http://www.thegameoflife.com[/url]) }
> > > > catch (Exception ex) {
> > > > Console.WriteLine(ex.GetType().ToString(); }
> > > > }
> > > >
> > > > the exception would be caught and
> > > > "System.Threading.ThreadAbortException" should (I haven'ta> > > > lately) be written to the output window. Note that if you dosince> > > > Response.Write(ex.Message) it will work, but is meaninglesswould> > the> > > > response is redirected, and therefore cleared. In general Iyou> > > > avoid having a Response.Redirect() inside a try/catch, becauseperformance> > tell> > > > always know it's going to throw an exception and, as the gurus> > > > us, throwing & catching the exceptions has a bit ofconfusing.> > > > overhead.
> > > >
> > > > Let me know if that clear things up or makes them morealso> > doesn't> > > > scott
> > > >
> > > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > > news:u3QgC9kODHA.3880@tk2msftngp13.phx.gbl...
> > > > > another interesting thought... why can i put this outside a
> > > > try/catch and it
> > > > > doesn't blow things up? if it raises an exception, the code> > > > seem to
> > > > > care...
> > > > >
> > > > > jeff
> > > > >
> > > > > "Scott" <scoonce@thegapJUNKcompany.com> wrote in message
> > > > > news:uRW6C3gODHA.1024@TK2MSFTNGP12.phx.gbl...
> > > > > > As Jason said: take a look at ThreadAbortException (andthread,> > exception> > > > > > response.redirect).
> > > > > >
> > > > > > The following are taken from the MSDN Help:
> > > > > >
> > > > > > HttpResponse.Redirect(string):
> > > > > > Redirect calls End which raises a ThreadAbortException> > > > upon
> > > > > > completion.
> > > > > >
> > > > > > ThreadAbortException:
> > > > > > When a call is made to the Abort method to destroy aisn't> > the> > caught,> > > > > > common language runtime throws a ThreadAbortException.
> > > > > > ThreadAbortException is a special exception that can be> > block.> > > > but it
> > > > > > will automatically be raised again at the end of the catch> > > > > >
> > > > > > I hope that helps.
> > > > > > Scott
> > > > > >
> > > > > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > > > > news:OE7CIqdODHA.2480@tk2msftngp13.phx.gbl...
> > > > > > > happens when you issue thread.abort on a thread. thisin> > controls.> > > > > > happening.
> > > > > > > it's a single thread and nowhere do i do any thread> > > > > > >
> > > > > > > jeff
> > > > > > >
> > > > > > > "Jason" <123456789clopper@totalise.co.uk987654321> wroteand> > changes> > > > message
> > > > > > > news:e6gmIfdODHA.2636@TK2MSFTNGP10.phx.gbl...
> > > > > > > > no offense here but you really should read up on
> > > > > > ThreadAbortException and
> > > > > > > > its siblings
> > > > > > > >
> > > > > > > >
> > > > > > > > "jeff" <vader1000x@yahoo.com> wrote in message
> > > > > > > > news:uZcMStbODHA.3192@TK2MSFTNGP10.phx.gbl...
> > > > > > > > > i am using asp .net 1.1. i am having a very strange
> > > > problem. i
> > > > > > had a
> > > > > > > > batch
> > > > > > > > > of code that was working great. i made a couple of> > > > and
> > > > > > i
> > > > > > > noticed
> > > > > > > > it
> > > > > > > > > was always throwing an exception. i worked on itthe> > below> > > > is
> > > > > > the code
> > > > > > > in
> > > > > > > > > the event that causes the pseudo exception. here isregardless> > > > strange
> > > > > > thing -
> > > > > > > i
> > > > > > > > > have my debugger set to break on all errorsthe> > of> > > > > > whether it is
> > > > > > > > > handled or not. it never breaks into the debugger.this is> > > > > > exception
> > > > > > > > reported
> > > > > > > > > is "thread is aborting" or something like that.of> > convinced> > > > bogus
> > > > > > because
> > > > > > > i'm
> > > > > > > > > not running a multi-threaded app! so, since i was> > > > > > this was a
> > > > > > > > > bogus error, i moved the response.redirect outsideTrue> > the> > also,> > > > > > try/catch
> > > > > > > block
> > > > > > > > > and it worked fine. can anybody explain this to me?> > > > this
> > > > > > code
> > > > > > > used
> > > > > > > > > to work fine.
> > > > > > > > >
> > > > > > > > > ' try to get data
> > > > > > > > > Try
> > > > > > > > >
> > > > > > > > > ' if made it this far, redirect to the report page.
> > > > > > > > >
> > > > > > > > > Response.Redirect("report.aspx")
> > > > > > > > >
> > > > > > > > > Catch ex As Exception
> > > > > > > > >
> > > > > > > > > ' set error condition to prompt user
> > > > > > > > >
> > > > > > > > > Session.Item(clsConstants.clsSession.MAIN_ERROR) =>> >> > > > > > > > >
> > > > > > > > > Session.Item(clsConstants.clsSession.EXCEPTION) = ex
> > > > > > > > >
> > > > > > > > >
> > > > DisplayError(Session.Item(clsConstants.clsSession. EXCEPTION),
> > > > > > Page,
> > > > > > > True)
> > > > > > > > >
> > > > > > > > > End Try
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Scott Guest



Reply With Quote

