使用 WIX 3.5 在 IIS 7/7.5 中添加/启用处理程序映射

问题描述 投票:0回答:2

WIX 3.5 使用 IIS6 添加通配符,但对于 IIS7/7.5 有 2 个问题。

  1. 处理程序映射默认处于禁用状态

    • 必须导航到“编辑功能权限”并选中“脚本”以允许。
  2. 通配符映射不是使用 IISWixExtension 库添加的。

    • 对于 IIS7/7.5,我需要手动执行此操作

用户将不知道如何执行上述操作。是的,非常不懂技术的人。

干杯

c# iis installation wix wix3.5
2个回答
1
投票

通过使用 UI 可以识别的适当标签更新 web.config 文件解决了这个问题。简单!!


0
投票
<InstallExecuteSequence>
    <Custom Action="CreateFastCGI" Before="InstallFinalize">
    <![CDATA[NOT Installed AND VersionNT64 >= 600]]>
 </Custom>
 <Custom Action="AddHandlerMappingsIIS2" Before="InstallFinalize">
  <![CDATA[NOT Installed AND VersionNT64 >= 600]]>
 </Custom>
</InstallExecuteSequence>

      <CustomAction Id="CreateFastCGI" Execute="deferred" Impersonate="no" Return="check" Directory="TARGETDIR"
                    ExeCommand="[SystemFolder]inetsrv\appcmd set config /section:system.webServer/fastCGI /+[\[]fullPath=&#39;[ApplicationPhpDirectory]php-cgi.exe&#39;[\]]" />
      <CustomAction Id="AddHandlerMappingsIIS2" Execute="deferred" Impersonate="no" Return="check" Directory="TARGETDIR"
                    ExeCommand="[SystemFolder]inetsrv\appcmd set config /section:system.webServer/handlers /+[\[]name=&#39;PHP_via_FastCGI&#39;,path=&#39;*.php&#39;,verb=&#39;*&#39;,modules=&#39;FastCgiModule&#39;,scriptProcessor=&#39;[ApplicationPhpDirectory]php-cgi.exe&#39;,resourceType=&#39;Unspecified&#39;[\]]" />
© www.soinside.com 2019 - 2024. All rights reserved.