开发者

Setting the AppPool of a WebSite element in WiX 3.6

I have a WiX installer which sets up a couple of root IIS websites each of which has a number of WebApplications. We have a separate AppPool for each root and put each of the WebApplications into that AppPool.

Unfortunately I can't find a way of making sure the WebSites go into their required AppPools and WiX insists on putting them in DefaultAppPool.

Am I missing anything 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:WebVirtualDi开发者_如何学运维r>
      <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>


I would guess that when you reference the AppPool name "RCMInput" in the WebApplication, it cannot resolve it and is defaulting the the Default App Pool. Have you tried running your MSI with logging turned on and see if that gives any extra detail?

From command line

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

There's a good blog post on deploying web apps in WiX at http://ranjithk.com/2009/12/17/automating-web-deployment-using-windows-installer-xml-wix/ where he defines the AppPool in the same component as the WebApplication.


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

Here's an excellent example


I was having the same problem, but I finally find a solution for it. Instead of nesting a WebApplication (which is referencing your app pool) inside a WebVirtualDir, put it directly inside 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 with 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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜