簡體   English   中英

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

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM