Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Application pool in WIX Installer

Tags:

iis

wix

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"  />
like image 922
user880385 Avatar asked Dec 12 '25 10:12

user880385


2 Answers

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

Hope, this might help you.

like image 191
Bhavya Shah Avatar answered Dec 15 '25 20:12

Bhavya Shah


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.

like image 30
Christopher Painter Avatar answered Dec 15 '25 19:12

Christopher Painter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!