[英]How to add AppPool to IIS on WiX Major Upgrade?
我正在尝试为工作中的Web应用程序编写WiX升级。 安装程序将在IIS中创建一个可以正常运行的站点和应用程序池。 升级时,它会在卸载RTM时删除站点和应用程序池(这是正确的),但由于创建应用程序池失败,因此只会在升级安装过程中重新创建站点。 日志显示如下:
MSI(s)(08:AC)[20:45:23:527]:调用远程自定义操作。 DLL:C:\\ Windows \\ Installer \\ MSI52F5.tmp,入口点:WriteIIS7ConfigChanges WriteIIS7ConfigChanges:错误0x80070002:无法获取httpErrors部分WriteIIS7ConfigChanges:错误0x80070002:无法配置IIS Asp属性。 WriteIIS7ConfigChanges:错误0x80070002:WriteIIS7ConfigChanges失败。
疯狂的事情是...如果我打开IIS并查看应用程序池,它将起作用。 我以为它很难获取此IIS Asp属性,但是我不知道如何提供它。 我有一个自定义操作,如果未通过运行以下命令进行设置,则会设置IIS:
dism.exe /在线/启用功能/功能名称:IIS-ASPNET45 /功能名称:IIS-HttpCompressionDynamic /全部/否重新启动
接下来是我要在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>
我以前从未使用过WiX,而是从离开公司的人那里继承来的。 除此以外,我几乎已经确定了升级所需要做的一切。 任何帮助将不胜感激。 提前致谢! 另外,如果我需要发布更多信息,我们将很乐意提供。
好吧,经过大量研究,我认为这只是WiX 3.10的错误,请参阅此处
我将继续尝试寻找解决方法,但这当然不是理想的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.