我已创建了在IIS中安装网站的WiX安装程序,但我必须保持IIS的向后兼容性。
<Component Id="VirtualDirectoryWebAppPool" Guid="{GIUD}" Permanent="yes">
<iis:WebAppPool Id="WebAppPool" Name="${ProductName}" ManagedRuntimeVersion="v4.0" ManagedPipelineMode="integrated" />
<CreateFolder />
</Component>
<Component Id="VirtualDirectoryWithoutWinAuth" Guid="{GUID}" Permanent="yes">
<Condition>TYPEOFAUTHENTICATION = "Forms"</Condition>
<iis:WebVirtualDir Id="WebVirtualDirectoryWithoutWinAuth" Alias="[VDNAME]" Directory="WEBUIFOLDER" WebSite="DefaultWebSite" >
<iis:WebApplication Id="WebApplicationWithoutWinAuth" Name="[VDNAME]" WebAppPool="WebAppPool" />
<iis:WebDirProperties Id="WebDirectoryPropertiesWithoutWinAuth" AnonymousAccess="yes" WindowsAuthentication="no" />
</iis:WebVirtualDir>
<CreateFolder />
</Component>
<Component Id="VirtualDirectoryWithWinAuth" Guid="{GIUD}" Permanent="yes">
<Condition>TYPEOFAUTHENTICATION = "Windows"</Condition>
<iis:WebVirtualDir Id="WebVirtualDirectoryWithWinAuth" Alias="[VDNAME]" Directory="WEBUIFOLDER" WebSite="DefaultWebSite" >
<iis:WebApplication Id="WebApplicationWithWinAuth" Name="[VDNAME]" WebAppPool="WebAppPool" />
<iis:WebDirProperties Id="WebDirectoryPropertiesWithWinAuth" AnonymousAccess="yes" WindowsAuthentication="yes" />
</iis:WebVirtualDir>
<CreateFolder />
</Component>
...
<iis:WebSite Id="DefaultWebSite" Description="Default Web Site" Directory="WEBUIFOLDER">
<iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>
但我不想保持IIS向后兼容性。