简体   繁体   English

如何在WiX Major Upgrade上将AppPool添加到IIS?

[英]How to add AppPool to IIS on WiX Major Upgrade?

I am trying to write a WiX upgrade for our Web Application at work. 我正在尝试为工作中的Web应用程序编写WiX升级。 The Installer will create a site and app pool in IIS which works fine. 安装程序将在IIS中创建一个可以正常运行的站点和应用程序池。 On upgrade it removes both the site and app pool during the un-installation of the RTM (which is correct), but only re-creates the site during install of the upgrade because the app pool creation fails. 升级时,它会在卸载RTM时删除站点和应用程序池(这是正确的),但由于创建应用程序池失败,因此只会在升级安装过程中重新创建站点。 Here is what the log says: 日志显示如下:

MSI (s) (08:AC) [20:45:23:527]: Invoking remote custom action. MSI(s)(08:AC)[20:45:23:527]:调用远程自定义操作。 DLL: C:\\Windows\\Installer\\MSI52F5.tmp, Entrypoint: WriteIIS7ConfigChanges WriteIIS7ConfigChanges: Error 0x80070002: Failed get httpErrors section WriteIIS7ConfigChanges: Error 0x80070002: Failed to configure IIS Asp property. DLL:C:\\ Windows \\ Installer \\ MSI52F5.tmp,入口点:WriteIIS7ConfigChanges WriteIIS7ConfigChanges:错误0x80070002:无法获取httpErrors部分WriteIIS7ConfigChanges:错误0x80070002:无法配置IIS Asp属性。 WriteIIS7ConfigChanges: Error 0x80070002: WriteIIS7ConfigChanges Failed. WriteIIS7ConfigChanges:错误0x80070002:WriteIIS7ConfigChanges失败。

The crazy thing is... It will work if I have IIS open and watching the app pools. 疯狂的事情是...如果我打开IIS并查看应用程序池,它将起作用。 I'm assuming it is having trouble getting this IIS Asp property, but I don't know how to provide it. 我以为它很难获取此IIS Asp属性,但是我不知道如何提供它。 I have a custom action that sets up IIS if it isn't set up by running this command: 我有一个自定义操作,如果未通过运行以下命令进行设置,则会设置IIS:

dism.exe /Online /Enable-Feature /FeatureName:IIS-ASPNET45 /FeatureName:IIS-HttpCompressionDynamic /All /NoRestart dism.exe /在线/启用功能/功能名称:IIS-ASPNET45 /功能名称:IIS-HttpCompressionDynamic /全部/否重新启动

And then here is what I'm attempting to do in IIS: 接下来是我要在IIS中执行的操作:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
 xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"
 xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension">
<Fragment>
<Property Id="APP_POOL_NAME" Value="BlahAppPool" Secure="yes"></Property>

<DirectoryRef Id="INSTALLFOLDER">
  <Component Id="BlahAppPool" Guid="{46BEB5E3-BD0C-4161-B8A4-10A1E106E0C7}" KeyPath="yes">
    <iis:WebAppPool Id="BlahAppPool"
                    Name="[APP_POOL_NAME]" 
                    Identity="applicationPoolIdentity"
                    ManagedPipelineMode="Integrated" 
                    ManagedRuntimeVersion="v4.0" />
  </Component>      
      <Component Id="InstallWebsite" Guid="{3423D559-A1C8-4764-BE0C-524AFB47508C}" KeyPath="yes">       
        <iis:WebVirtualDir Id="BlahWebsite"
                       Directory="INSTALLFOLDER"
                       Alias="[WEBAPPNAME]"
                       WebSite="DefaultWebSite">
      <!-- Turn the virtual directory into a web application -->
      <iis:WebApplication Id="BlahWebApplication" Name="Blah Web App" WebAppPool="BlahAppPool" />
    </iis:WebVirtualDir>
    <!-- This is pretty important. If the CreateFolder isn’t there the 
             WebVirtualDir won’t get created as there’s no files in this 
             component. 
             http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg03483.html -->
    <CreateFolder/>
  </Component>

</DirectoryRef>

<!-- Reference the default web site. Outside a component means the website element is a locator/search. Inside 
     a component means it’s a creator.-->
<iis:WebSite Id="DefaultWebSite"
             Description="Default Web Site"
             Directory="INSTALLFOLDER">
  <iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>
<ComponentGroup Id="BlahSiteIisConfiguration">
  <ComponentRef Id="BlahAppPool" />
  <ComponentRef Id="InstallWebsite" />
</ComponentGroup>
</Fragment>
</Wix>

I've never used WiX before and inherited this from someone who left the company. 我以前从未使用过WiX,而是从离开公司的人那里继承来的。 I've figured out just about everything I need to do for the upgrade except for this. 除此以外,我几乎已经确定了升级所需要做的一切。 Any help would be greatly appreciated. 任何帮助将不胜感激。 Thanks in advance! 提前致谢! Also, if I need to post more information I'll gladly provide it. 另外,如果我需要发布更多信息,我们将很乐意提供。

Well, after much research, I believe this is currently just a bug with WiX 3.10, see here 好吧,经过大量研究,我认为这只是WiX 3.10的错误,请参阅此处

I am going to continue trying to find a work around, but of course that isn't ideal. 我将继续尝试寻找解决方法,但这当然不是理想的选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将“ IIS AppPool \\ DefaultAppPool”添加到组中? - How can I add `IIS AppPool\DefaultAppPool` to a group? 如何授予IIS AppPool桌面权限 - How to give IIS AppPool Desktop Rights 用户“IIS APPPOOL\\myAppPoolName”登录失败,无法为此添加新用户 - Login failed for user 'IIS APPPOOL\myAppPoolName' and cannot add new user for this 如何使用自定义引导程序执行Wix升级 - How to perform Wix Upgrade with custom bootstrapper 如何卸载没有升级机制的WiX软件包 - How to uninstall a WiX package that has no upgrade mechanism IIS:使用AppPool身份访问Microsoft CRM 2013 - IIS: Access Microsoft CRM 2013 with AppPool Identity 无法将IIS AppPool回收条件更改为0 - Can't change IIS AppPool recycling conditions to 0 如何设置 .NET WindowsAuthentication - 当我希望它使用实际用户时,名称始终显示为“IIS APPPOOL\\Classic .NET AppPool” - How do I set up .NET WindowsAuthentication - the name always shows up as “IIS APPPOOL\Classic .NET AppPool” when I want it to use the actual user 使用WIX 3.5在IIS 7 / 7.5中添加/启用处理程序映射 - Add/Enable handler mapping in IIS 7/7.5 using WIX 3.5 Asp.Net MVC 5-长期运行的任务-如何确保在IIS回收AppPool时不会抛弃工作线程? - Asp.Net MVC 5 - Long Running Task - How to ensure that worker thread won't be thrown away when IIS recycles the AppPool?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM