user880385
user880385

Reputation: 98

Creating Application pool in WIX Installer

I'm creating website with custom application pool settings using WIX. After installation my new website is using Default Application Pool instead of using the one that I'm creating during installation. I could find ways for virtual directory to point to newly created app pool but seems iis:WebSite does not have attribute for setting app pool.

Here is my code:

<iis:WebSite Id="MyWebSite" Description='MyWebsiteDesc' SiteId='*' Directory='MyWebFolder'>
  <iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>

<util:User Id="MyAppPoolUser" 
           CreateUser="no" 
           Name="[APPPOOL_USER]" 
           Password="[APPPOOL_PASS]" 
           Domain="." />

<iis:WebAppPool Id="MyAppPool" 
                Name="[WEB_APP_NAME]" 
                Identity="other" 
                User="MyAppPoolUser" 
                ManagedRuntimeVersion="v4.0" 
                ManagedPipelineMode="Integrated"  />

Upvotes: 3

Views: 6406

Answers (3)

Paras Sachapara
Paras Sachapara

Reputation: 372

I recently faced this issue. All my web application inside website were assigned new app pool I created but base website was having DefaultAppPool.

This is the trick to assign app pool to base website

 <iis:WebAppPool Id="MyAppPool" Name="YourAppPoolName" Identity="applicationPoolIdentity" />

     <iis:WebSite Id='MyWebSite' Description='Dummy' Directory='APPLICATIONFOLDER'>   

    <iis:WebApplication Id="AnyId" Name="Dummy" WebAppPool="MyAppPool" />  

 </iis:WebSite>

Upvotes: 0

Bhavya Shah
Bhavya Shah

Reputation: 78

Use IIS:WebVirtualDir/IIS:WebApplication to point to your AppPool.

Hope, this might help you.

Upvotes: 4

Christopher Painter
Christopher Painter

Reputation: 55601

You have created an application pool but you have only created a web site. To use the application pool, you must create a virtual directory or application within the website. Both the WebVirtualDir and WebApplication elements have a WebAppPool attribute that you can use to configure IIS to use the application pool you are creating.

Upvotes: 1

Related Questions