thread-abort

SqlClient calls causing “Thread was being aborted at SNINativeMethodWrapper.SNIPacketGetConnection(IntPtr packet)”

落花浮王杯 提交于 2019-12-22 05:23:25
问题 I would really appreciate any suggestions, no matter how simple or complex, to help me get this issue isolated and resolved. I have a bit of code that generates small report files. For each file in the collection, a stored proc is executed to get the data via XML reader (its a pretty big result set). When I created all this, and stepped through it, all is well. Files are generated, no errors. This library is called via remoting, and is hosted via IIS. When I deploy the compiled library and

How do I suppress a thread.abort() error C#?

扶醉桌前 提交于 2019-12-18 13:32:20
问题 I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a ThreadAbortException that the user can just click Continue on. How do I deal with this? I was trying to suppress it like so --> try { Program.splashThread.Abort(); } catch(Exception ex) { } but I have a feeling that is going to get me yelled at here and it doesn't

Abort all instances of XMLHttpRequest

橙三吉。 提交于 2019-12-11 11:55:34
问题 I have this line of code that calls the function SigWebRefresh at specified intervals ( 50 milliseconds). tmr = setInterval(SigWebRefresh, 50); SigWebRefresh performs XMLHTTPRequest : function SigWebRefresh(){ xhr2 = new XMLHttpRequest(); xhr2.open("GET", baseUri + "SigImage/0", true ); xhr2.responseType = "blob"; xhr2.onload = function (){ var img = new Image(); img.src = getBlobURL(xhr2.response); img.onload = function (){ Ctx.drawImage(img, 0, 0); revokeBlobURL( img.src ); img = null; } }

Rethrowing exception in Task doesn't make the Task to go to faulted state

牧云@^-^@ 提交于 2019-12-11 03:59:18
问题 Consider following scenario var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(2)); var startNew = Task.Factory.StartNew(() => { var currentThread = Thread.CurrentThread; try { using (cancellationTokenSource.Token.Register(currentThread.Abort)) new AutoResetEvent(false).WaitOne(Timeout.InfiniteTimeSpan); } catch (ThreadAbortException abortException) { throw new TimeoutException("Operation timeouted", abortException); } }, cancellationTokenSource.Token,

When an ASP.NET System.Web.HttpResponse.End() is called, the current thread is aborted?

余生长醉 提交于 2019-12-09 05:08:45
问题 when a System.Web.HttpResponse.End() is called a System.Thread.Abort is being fired, which i'm guessing is (or fires) an exception? I've got some logging and this is being listed in the log file... A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll 12/14/2008 01:09:31:: Error in Path :/authenticate Raw Url :/authenticate Message :Thread was being aborted. Source :mscorlib Stack Trace : at System.Threading.Thread.AbortInternal() at System

SqlClient calls causing “Thread was being aborted at SNINativeMethodWrapper.SNIPacketGetConnection(IntPtr packet)”

心已入冬 提交于 2019-12-05 07:56:18
I would really appreciate any suggestions, no matter how simple or complex, to help me get this issue isolated and resolved. I have a bit of code that generates small report files. For each file in the collection, a stored proc is executed to get the data via XML reader (its a pretty big result set). When I created all this, and stepped through it, all is well. Files are generated, no errors. This library is called via remoting, and is hosted via IIS. When I deploy the compiled library and call it, its able to generate some of the reports, but then throws a Thread Abort Exception. If I attach

Thread abort leaves zombie transactions and broken SqlConnection

丶灬走出姿态 提交于 2019-12-04 10:13:20
问题 I feel like this behavior should not be happening. Here's the scenario: Start a long-running sql transaction. The thread that ran the sql command gets aborted (not by our code!) When the thread returns to managed code, the SqlConnection's state is "Closed" - but the transaction is still open on the sql server. The SQLConnection can be re-opened, and you can try to call rollback on the transaction, but it has no effect (not that I would expect this behavior. The point is there is no way to

When an ASP.NET System.Web.HttpResponse.End() is called, the current thread is aborted?

守給你的承諾、 提交于 2019-11-30 08:27:58
when a System.Web.HttpResponse.End() is called a System.Thread.Abort is being fired, which i'm guessing is (or fires) an exception? I've got some logging and this is being listed in the log file... A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll 12/14/2008 01:09:31:: Error in Path :/authenticate Raw Url :/authenticate Message :Thread was being aborted. Source :mscorlib Stack Trace : at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at DotNetOpenId.Response.Send() at

Thread.Abort doesn't seem to throw a ThreadAbortException because of AcceptSocket

拥有回忆 提交于 2019-11-29 15:10:53
I am calling ChannelServer.ListeningThread.Abort on the following thread, however nothing seems to happen. I would like to be more specific, but I can't think of anything more. There seems to be no ThreadAbortException that is thrown, and this exception should be thrown regardless of the blocking listener (it works perfectly on threads that are blockingly-receiving). Important EDIT : With a ManualResetEvent.WaitOne instead of AcceptSocket , as Lyrik has suggested for testing, it works perfectly. How come AcceptSocket blocks the ThreadAbortException ? LINK : This forum thread seems to discuss

Thread.Abort doesn't seem to throw a ThreadAbortException because of AcceptSocket

依然范特西╮ 提交于 2019-11-28 08:51:57
问题 I am calling ChannelServer.ListeningThread.Abort on the following thread, however nothing seems to happen. I would like to be more specific, but I can't think of anything more. There seems to be no ThreadAbortException that is thrown, and this exception should be thrown regardless of the blocking listener (it works perfectly on threads that are blockingly-receiving). Important EDIT : With a ManualResetEvent.WaitOne instead of AcceptSocket , as Lyrik has suggested for testing, it works