I want to set the application pool for a website that I'm installing, but there is no virtual directory or web application. The website is contained directly in the website
entry in IIS and I want wix to set the application pool for that website.
Is this possible?
Have you looked that the WebAppPool Element?
This article 'creating a web application installer ...' may provide you with some useful info e.g.
<!-- Define App Pool - identity if not set defaults to: ApplicationPoolIdentity -->
<iis:WebAppPool Id="AppPool" Name="[VD][WEBSITE_ID]" ManagedRuntimeVersion="v4.0"
IdleTimeout="0" RecycleMinutes="0" ManagedPipelineMode="integrated">
</iis:WebAppPool>
<iis:WebVirtualDir Id="VDir" Alias="[VD]"
Directory="INSTALLLOCATION"
WebSite="SelectedWebSite">
<iis:MimeMap Id="SilverlightMimeType" Extension=".xap"
Type="application/x-silverlight-app" />
<iis:WebApplication Id="MyWebAppApplication" WebAppPool="AppPool"
Name="[VD][WEBSITE_ID]" />
<iis:WebDirProperties Id="MyWebSite_Properties" AnonymousAccess="yes"
WindowsAuthentication="no" DefaultDocuments="Default.aspx" />
</iis:WebVirtualDir>
to connect them the iis:WebApplication/@WebAppPool
entry is used to reference the AppPool iis:WebAppPool/@Id
One other suggestion is to update the WebApplication of the WebSite like this e.g.
<Component Id="WebSite" Guid="PUT-YOUR-GUID-HERE">
<CreateFolder/>
<iis:WebSite Id="WebSite" Directory="WebSiteRoot" Description="[WEBSITEDESCRIPTION]" >
<iis:WebApplication Id="WebSiteApplication" Name="[WEBSITEDESCRIPTION]" WebAppPool="MyAppPool" />
</iis:WebSite>
<iis:WebAppPool Id="MyAppPool" Name="[APPPOOLNAME]" ManagedRuntimeVersion="v4.0"/>
</Component>