title: Thread Abort Exception in WCF Service
body: <p>I am getting a weird error while running my WCF service. Thread abort receiving while running i searched for many solution nothing helped am posting my error below. </p>
  
  <p>I am calling a WCF service from the webpage. The WCF service executes a stored procedure in a for loop, whether this causes thread abort? I even tried increasing the httpruntime execution timeout in <code>web.config</code> but without success.</p>
  
  <pre><code>System.Threading.ThreadAbortException: Thread was being aborted.
     at SNIReadSyncOverAsync(SNI_ConnWrapper* , SNI_Packet** , Int32 )
     at SNINativeMethodWrapper.SNIReadSyncOverAsync(SafeHandle pConn, IntPtr&amp; packet, Int32 timeout)
     at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
     at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
     at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
     at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte&amp; value)
     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)
     at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
     at System.Data.SqlClient.SqlDataReader.get_MetaData()
     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader ds)
     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean asyncWrite)
     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
     at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
     at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
     at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
     at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
     at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()
     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
  </code></pre>