Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ThreadAbortException in at System.Net.UnsafeNclNativeMethods.OSSOCK.recv

Suddenly, this exception started happening in my program. Any ideas, what can be the reason?
Running on .NET 4.0

   at System.Net.UnsafeNclNativeMethods.OSSOCK.recv(IntPtr socketHandle, Byte* pinnedBuffer, Int32 len, SocketFlags socketFlags)
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, SocketError& errorCode)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
   at System.Net.ConnectStream.ProcessWriteCallDone(ConnectionReturnResult returnResult)
   at System.Net.HttpWebRequest.GetResponse()
   at System.Net.WebClient.GetWebResponse(WebRequest request)
   at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream, CompletionDelegate completionDelegate, A
syncOperation asyncOp)
   at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
like image 839
user626528 Avatar asked Oct 25 '25 04:10

user626528


1 Answers

There was a Thread.Abort() call deep inside of guts of the program. That was the reason.

like image 159
user626528 Avatar answered Oct 26 '25 19:10

user626528



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!