在 WiX 3.6 中设置 WebSite 元素的 AppPool

发布于 2024-11-08 02:04:36 字数 1817 浏览 0 评论 0 原文

我有一个 WiX 安装程序,它设置了几个根 IIS 网站,每个网站都有许多 Web 应用程序。我们为每个根都有一个单独的应用程序池,并将每个 Web 应用程序放入该应用程序池中。

不幸的是,我找不到一种方法来确保网站进入其所需的应用程序池,而 WiX 坚持将它们放入默认应用程序池中。

我在这里错过了什么吗?

  <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>

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: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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独自唱情﹋歌 2024-11-15 02:04:36

我猜当您在 WebApplication 中引用应用程序池名称“RCMInput”时,它无法解析它并且默认使用默认应用程序池。您是否尝试过在打开日志记录的情况下运行 MSI,看看是否提供了任何额外的详细信息?

从命令行

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

有一篇关于在 WiX 中部署 Web 应用程序的好博客文章,位于 http://ranjithk.com/2009/12/17/automating-web-deployment-using-windows-installer-xml-wix/ 他在同一组件中定义了 AppPool Web 应用程序。

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.

梦境 2024-11-15 02:04:36

不确定 3.6 中是否已更改,但对于 3.5,当 WebApplication 中引用 AppPool 时,请使用 Id,而不是使用 RCMInpAppPool,而使用 INPUTPool。

这是优秀示例

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

音栖息无 2024-11-15 02:04:36

我也遇到了同样的问题,但我终于找到了解决方案。不要将 WebApplication(引用您的应用程序池)嵌套在 WebVirtualDir 中,而是将其直接放入您的网站中。所以,如果你有这个:

<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>

替换为:

<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>

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文