Configuring the AppPool WebSite Element in WiX 3.6

I have a WiX installer that installs a pair of IIS root websites, each of which has several WebApplications. We have a separate AppPool for each root and puts each of the WebApplications in this AppPool.

Unfortunately, I cannot find a way to make sure that the websites are included in their required AppPools, and WiX insists on putting them in DefaultAppPool.

Am I missing something here?

<Component Id="INPUT" Guid="{43302D85-55B5-4C99-8C07-8AF5ED419E0A}" Directory="dirBBD4B479DF2AD0441616B5EB11867FA6" KeyPath="yes"> <iis:WebAppPool Id="INPUTPool" Name="RCMInput" ManagedPipelineMode="integrated" ManagedRuntimeVersion="v4.0"/> </Component> <Component Id="INPUTSITE" Directory="dirBBD4B479DF2AD0441616B5EB11867FA6" Guid="{E508497A-C485-4EB8-8A91-4299BD46291B}" KeyPath="yes"> <iis:WebSite Id="INPUTROOT" Description="RCMInput" Directory="dirBBD4B479DF2AD0441616B5EB11867FA6" AutoStart="yes" > <iis:WebAddress Id="INPUTROOTADDRESS" IP="[RCMINPIP]" Port="443" Secure="yes" Header="[RCMINPHOST]" /> <iis:WebVirtualDir Id="INPUTVD" Alias="InputApp" Directory="dir0AC030D54BBE340DFFCC71C2724F6BF1"> <iis:WebApplication Id="INPUTWEBAPP" Name="InputApp" WebAppPool="RCMInpAppPool"> <iis:WebApplicationExtension CheckPath="no" Extension="svc" Executable="[NETFRAMEWORKROOT]v2.0.50727\aspnet_isapi.dll" Verbs="GET,HEAD,POST,PUT,DELETE"/> </iis:WebApplication> </iis:WebVirtualDir> <iis:WebVirtualDir Id="INPUTVD2" Alias="Administration" Directory="dir78ADFB9F5CBB65D9A3E21EAB7F4C5911"> <iis:WebApplication Id="INPUTWEBAPP2" Name="Administration" WebAppPool="RCMInpAppPool"> <iis:WebApplicationExtension CheckPath="no" Extension="svc" Executable="[NETFRAMEWORKROOT]v2.0.50727\aspnet_isapi.dll" Verbs="GET,HEAD,POST,PUT,DELETE"/> </iis:WebApplication> </iis:WebVirtualDir> </iis:WebSite> </Component> 
+2
source share
3 answers

I would suggest that when you refer to the AppPool name "RCMInput" in WebApplication, it cannot solve it and by default uses the default application pool. Have you tried running MSI with logging enabled and see if this provides additional information?

From the command line

 msiexec /i install.msi -L*v install.log 

There is a good blog post about deploying web applications on WiX at http://ranjithk.com/2009/12/17/automating-web-deployment-using-windows-installer-xml-wix/ where it defines AppPool in same component as WebApplication.

+1
source

Not sure if it changed in 3.6, but for 3.5, when the AppPool application references in WebApplication, use Id, use INPUTPool instead of using RCMInpAppPool.

Here is a great example.

+1
source

I had the same problem, but I finally found a solution for it. Instead of embedding WebApplication (which refers to your application pool) inside WebVirtualDir, put it directly on your website. So, if you have this:

 <iis:WebSite Id='WebSite' Description='My Website' Directory="WebsiteDir"> <iis:WebAddress Id='WebAddress' Port='80' /> <iis:WebVirtualDir Id="VirtualDir" Alias="mywebsite" Directory="WebsiteDir"> <iis:WebApplication Id="WebApplication" Name="MyWebApplication" WebAppPool="MyWebAppPool" /> </iis:WebVirtualDir> </iis:WebSite> 

Replace this:

 <iis:WebSite Id='WebSite' Description='My Website' Directory="WebsiteDir"> <iis:WebAddress Id='WebAddress' Port='80' /> <iis:WebVirtualDir Id="VirtualDir" Alias="mywebsite" Directory="WebsiteDir" /> <iis:WebApplication Id="WebApplication" Name="MyWebApplication" WebAppPool="MyWebAppPool" /> </iis:WebSite> 
0
source

Source: https://habr.com/ru/post/977108/


All Articles