title: Run code under WCF vs "regular" code execution, what the difference?
body: <p>I have peace of code (uses SharePoint Object Model) that runs in two modes:</p>
  
  <ol>
  <li>Run from plain console application or from unit test runner. In this case code works.</li>
  <li>Run in WCF Service. WCF Service is hosted in console application. No special security configurations, everything by default. Execution fails.</li>
  </ol>
  
  <p>What possible differences in execution for this two modes, especially related to security(e.g. contexts, principals)?</p>
  
  <p>SharePoint Object Model is where problem appears, but this is not primary target of question. It is more interesting what differences in general case. If you need more specifics, let me know, I will update question.</p>
  
  <p>Differences so far:</p>
  
  <ol>
  <li>Thread.CurrentThread.IsThreadPoolThread (#1 - false, #2 - true), it obviously comes from threadpool</li>
  </ol>