title: How to make a WCF service STA (single-threaded)
body: <p>I have a WCF service which includes UI components, which forces me to be in STA mode.</p>
  
  <p>How do I set the service behaviour to STA-mode?</p>
  
  <hr>
  
  <p>The service uses a reference to a WPF DLL file which opens a UI window (used as view port) for picture analysis. When the service is trying to create an instance of that item (inherits from window) it throws an exception:</p>
  
  <blockquote>
    <p>The calling thread must be an STA</p>
  </blockquote>