0

我已经创建了在 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 的向后兼容性。

4

0 回答 0