title: wix installer / Create web-site and assign the new or exisiting web app pool
body: <p>i try create a new web-site using wix installation. it's ok there is no problem but i cannot assign a new or existing web app pool to new web-site. iis:website tag does not contains WebAppPool attribute. How can i assign web app pool to web-site. You can see my code bellow.</p>
  
  <p>thanks for helping.</p>
  
     <pre class="lang-xml prettyprint-override"><code>        &lt;Component Id="WEB_SITE_CONFIGURE_COMPONENT" Guid="{35087032-D049-48C8-BCAD-1FEFD0C06A25}" NeverOverwrite="yes" Shared="yes" Permanent="yes" Transitive="yes"&gt;
            &lt;Condition&gt;&lt;![CDATA[WEBSITE_INSTALLTYPE&lt;&gt;2]]&gt;&lt;/Condition&gt;
            &lt;CreateFolder Directory="WEBSITE_FOLDER"/&gt;
            &lt;iis:WebSite Id="WEB_SITE" Description="[WEBSITE_NAME]" SiteId="*" Directory="WEBSITE_FOLDER" ConfigureIfExists="yes" AutoStart="yes" StartOnInstall="yes"&gt;
              &lt;iis:WebAddress Id="AllUnassigned" Port="[WEBSITE_PORT]" /&gt;            
            &lt;/iis:WebSite&gt;
            &lt;RegistryValue Root="HKLM" Key="$(var.DefaultRegistryKey)" Name="ConfigSite" Value="1" Type="string"&gt;&lt;/RegistryValue&gt;
          &lt;/Component&gt;        
  
          &lt;Component Id="WEBAPP_POOL_CONFIGURE_COMPONENT" Guid="{316738A6-26A2-4C14-9AB9-B2066E3FA288}" KeyPath="yes" Permanent="yes" Transitive="yes"&gt;
            &lt;Condition&gt;&lt;![CDATA[(WEBSITE_INSTALLTYPE=0) OR (USE_CUSTOM_WEBSITE_FOLDER=1)]]&gt;&lt;/Condition&gt;          
            &lt;iis:WebAppPool Id="APP_POOL" Name="[WEBAPP_POOL_NAME]" ManagedPipelineMode="Classic" ManagedRuntimeVersion="v4.0"/&gt;
            &lt;RegistryValue Root="HKLM" Key="$(var.DefaultRegistryKey)" Name="ConfigPool" Value="1" Type="string"&gt;&lt;/RegistryValue&gt;
          &lt;/Component&gt;
  
          &lt;Component Id="WEPAPP_CONFIGURE_COMPONENT" Guid="{F95B024E-B6B6-4E6C-AC35-9B1086FC3521}" Transitive="yes"&gt;
            &lt;Condition&gt;&lt;![CDATA[(WEBSITE_INSTALLTYPE&lt;&gt;2) AND ((WEBSITE_INSTALLTYPE=0) OR (USE_CUSTOM_WEBSITE_FOLDER=1))]]&gt;&lt;/Condition&gt;
            &lt;iis:WebVirtualDir Id="VIRTUAL_DIR" Alias="[WEB_APP_NAME]" Directory="WWW_FOLDER" WebSite="WEB_SITE"&gt;
              &lt;iis:WebApplication Id="WEB_APP" Name="[WEB_APP_NAME]" WebAppPool="APP_POOL"/&gt;            
            &lt;/iis:WebVirtualDir&gt;
            &lt;RegistryValue Root="HKLM" Key="$(var.DefaultRegistryKey)" Name="ConfigVirtualDir" Value="1" Type="string"&gt;&lt;/RegistryValue&gt;
          &lt;/Component&gt;
  </code></pre>