title: Multiple app domains in w3wp when using serivceAutoStartProvider
body: <p>We are using the <strong>serviceAutoStartProvider</strong> functionality in IIS to launch worker threads without the need for a request to trigger the startup code. We do that in a <strong>.NET 4.5.2 WebApi application using the IProcessHostPreloadClient</strong> implementation.</p>
  
  <p>This application is deployed to a Windows 2008 R2 server where a dozen web applications are hosted under the same main site. All applications use a separate .NET 4.0 Integrated app pool (with the ApplicationPoolIdentity).</p>
  
  <p>We use the following appcmd.exe commands to configure out WebApi application:</p>
  
  <pre><code>appcmd.exe clear config -section:system.applicationHost/serviceAutoStartProviders -commit:apphost
  appcmd.exe set config -section:system.applicationHost/serviceAutoStartProviders /+"[name='MyAutoStartup',type='WorkerHost.StartupClient, WorkerHostAssembly, version=1.0.0.0, Culture=neutral, PublicKeyToken=null']" /commit:apphost
  appcmd.exe set apppool "WorkerHostPool" /autoStart:"true" /startMode:"AlwaysRunning" /processModel.idleTimeout:00:00:00
  appcmd.exe set app "Default Web Site/WorkerHost" /serviceAutoStartProvider:"MyHostAutoStartup" /serviceAutoStartEnabled:"true"
  </code></pre>
  
  <p>We have observed that <strong>serveral w3wp.exe processes have three app domains loaded</strong>: the SharedDomain Appdomain, the app domain for the one of the web applications, <strong>and a thrid app domain for the web application that uses the autoStart functionaltiy!</strong></p>
  
  <p>Why is that happening? And more importantly, <strong>how can this be prevented?</strong></p>