title: Thread was being aborted
body: <p>I was wondering if somebody help me with next error.</p>
  
  <p>I have an app -windows service, which by a timer calls some function for manipulating with database (linq2sql).</p>
  
  <p>Approximately after 3-5 calls I always receive next error "Thread was being aborted." in next source code </p>
  
  <pre><code> var ctx= new myLinq2SqlDataContext();
   var res = ctx.SomeData.Where();
  </code></pre>
  
  <p>I don't use multithreading! I use lock statement when call a function for working with database. I have only 1 service which works with context.</p>
  
  <p>Here is my code snippet </p>
  
  <pre><code>public partial class DataService : ServiceBase
      {
           private static object timerProcessLockObject = new object();
           static object _receiverTimerLockObject = new object();
  
           void OnStart()
           {
              if (_receiverTimer == null)
              {
                  lock (_receiverTimerLockObject)
                  {
                      if (_receiverTimer == null)
                      {                      
                          _receiverTimer = new Timer(new TimerCallback(ReceiverTimer_TimerCallback), null, 0, 60000);    
                       }
                   }
  
              }
           }
  
           private void ReceiverTimer_TimerCallback(object state)
           {       
              lock (timerProcessLockObject)
              {   
                    var receiveService = new ReceiverService();
                    receiveService.GetData();
               }
            }    
      }
  
      [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
      public class ReceiverService : IReceiverService
      {      
          public void GetData()
          {          
              IDataControler myController = new DataControler();
              myController.GetData();           
          }           
      }
  
      public class DataControler : IDataControler
      {      
          public void GetData()
          {                
              IMyDomainService myDomainService = new MyDomainService();
              myDomainService.SomeFunc();          
  
              IMyExtraDomainService myExtraService = new MyExtraDomainService();
              var data = myExtraService.SomeFuns();
  
              var convertedData = ConvertData(data);
              myDomainService.SaveData(convertedData);
  
              DBConnection newConnection = new DBConnection();
              myDomainService.AddNewConnection(newConnection);           
          }    
       }
  
      public class MyExtraDomainService : IMyExtraDomainService
      {   
          public IList&lt;Entity&gt; SomeFuns()
          {
              try
              {             
                  var myCtx = new MyLinq2SqlDataContext();         //!!!! Here I receive error
                  return myCtx.SomeEntities.Where(...).ToList();
              }   
              catch (Exception exc)
              {              
                  throw;
              }            
          }
      } 
  </code></pre>
  
  <p><strong>UPDATED</strong></p>
  
  <p>Here is stack trace </p>
  
  <pre><code>at SNIReadSync(SNI_Conn* , SNI_Packet** , Int32 )
     at SNINativeMethodWrapper.SNIReadSync(SafeHandle pConn, IntPtr&amp; packet, Int32 timeout)
     at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
     at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
     at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
     at System.Data.SqlClient.TdsParserStateObject.ReadByte()
     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
     at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
     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)
     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
     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.Common.DbCommand.ExecuteReader()
     at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
     at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
     at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
     at System.Data.Linq.DataQuery`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)                                                                                       at MY FUNCTION call
  </code></pre>
  
  <p>What is the reason?
  Thanks in advance! </p>