我正在使用Wix 3.6將Web應用程序安裝到IIS 7,並且安裝工作正常,但在使用添加/刪除程序或MSIExec卸載應用程序時,我在IIS中出現以下錯誤。WIX 3.6 IIS 7安裝程序導致'站點1沒有定義根應用程序,因此該站點將被忽略。卸載時出錯
執行此操作時發生錯誤。 詳情: 應用程序'/'不存在。
系統日誌中的錯誤如下。
站點1沒有定義根應用程序,所以該站點將被忽略。在卸載使用MSIEXEC和/ qb選項時
日誌文件顯示僅這一個錯誤,它並不看起來像它可能會導致這種類型的問題,在IIS中的默認Web站點目錄成爲腐敗的,但也許它可以。
動作開始7:04:40:ExitDialog。 DEBUG:Error 2726:Action not found:ExitDialog安裝程序遇到意外錯誤 安裝此軟件包。這可能表示此 軟件包存在問題。錯誤代碼是2726.參數是:ExitDialog,, 操作結束7:04:40:ExitDialog。返回值0.操作結束 7:04:40:INSTALL。返回值1.
這是wix文件的相關部分。如果任何人有任何想法可以指向正確的方向,他們將不勝感激。提前致謝。
<Product
Name="$(var.WebName)"
Id="*"
UpgradeCode="GUID"
Manufacturer="MyCo"
Version="$(var.ProductVersion)"
Language="1033">
<Package Id='*'
InstallScope="perMachine"
Manufacturer="MyCo"
InstallerVersion="200"
Languages="1033"
Compressed="yes"/>
<MajorUpgrade Schedule="afterInstallValidate"
DowngradeErrorMessage='A later version of this application is already installed. Setup will now exit'></MajorUpgrade>
<Media Id="1" Cabinet="MyProduct.cab" EmbedCab="yes" />
<Property Id="IISROOT">
<RegistrySearch Id="WEBROOT" Root="HKLM" Key="Software\Microsoft\InetStp" Name="PathWWWRoot" Type="raw" />
</Property>
<Property Id="WIXUI_INSTALLDIR" Value="FILEINSTALLDIR" Secure="yes" >
<RegistrySearch Id="WIXUI_INSTALLDIR" Type="raw" Root="HKLM" Key="SOFTWARE\MyCo" Name="InstallDir" />
</Property>
<Property Id="WIXUI_VIRTUALDIR" Secure="yes" Value="VIRTUALDIR" >
<RegistrySearch Id="WIXUI_VIRTUALDIR" Type="raw" Root="HKLM" Key="SOFTWARE\MyCo" Name="WixUiVirtualDir" />
</Property>
<Property Id="VIRTUALDIR" Secure="yes" Hidden="no" >
<RegistrySearch Id="VIRTUALDIR" Type="raw" Root="HKLM" Key="SOFTWARE\MyCo" Name="VirtualDir" />
</Property>
<CustomAction Id="FILEINSTALLDIR" Property="FILEINSTALLDIR" Value="[IISROOT]\[VIRTUALDIR]" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="IISROOT" Name=".">
<Directory Id="FILEINSTALLDIR" Name="AppDirectory">
<Component Id="MyCo_AppComponent" Guid="GUID">
<File Source=...
</Component>
</Directory>
</Directory>
</Directory>
<iis:WebSite Id="DefaultWebSite" Description="Default Web Site" SiteId="*">
<iis:WebAddress Id="AllUnassigned" Port="1" />
</iis:WebSite>
<DirectoryRef Id="FILEINSTALLDIR">
<Component Id="MyCoSiteComponent" Guid="GUID" KeyPath="yes">
<iis:WebVirtualDir Id='AppComponentVirtDir' Alias='[VIRTUALDIR]' Directory='FILEINSTALLDIR'
WebSite='DefaultWebSite'>
<iis:WebDirProperties Id="AppComponentVirtDirProperties"
AnonymousAccess="no" BasicAuthentication="no"
WindowsAuthentication="yes" />
<iis:WebApplication Id='MyAppName' Name='[VIRTUALDIR]' Isolation='medium' />
</iis:WebVirtualDir>
</Component>
</DirectoryRef>
我想通了,我在做什麼錯了,有是被命名爲一個註冊表設置在查找中有所不同,然後是在刪除中,因爲我沒有在原始代碼中包含該代碼,所以我將在下面包含錯誤的代碼示例。 – likestoski