我有一个Wix安装程序,可以在IIS中部署我的应用程序。我想在部署时删除HTTP绑定。
下面是帮助删除HTTP绑定的cmd命令: “设置站点/site.name:“我的项目管理” /-bindings.[protocol='http',bindingInformation ='*:80:']”
我希望通过wix自定义操作发生相同的事情。类似如下:
<CustomAction Name="RemoveHttp_Cmd" Schedule="Before" Reference="RemoveHttp" Condition="Installed">
<Definition Property="RemoveHttp" Execute="immediate" Value=""[WindowsFolder]system32\inetsrv\appcmd.exe" set site /name:"My Project Management" /-bindings:"http/*:80:"" />
</CustomAction>
<CustomAction Name="RemoveHttp" Schedule="Before" Reference="CreateAppPool" Condition="Installed">
<Definition BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" />
</CustomAction>
理想情况下,它应该删除绑定,但实际上不是。 请提出正确的做法。
答案 0 :(得分:0)
您可能要查看IIS Rewrite模块。根据我的经验,如果不存在该模块,并且可以在应用程序中使用少量XML,可以使用引导程序安装该模块。web.config设置规则以将http重写为https或将其重写为不支持的HTTP页。除了确保应该存在重写模块之外,安装程序不需要其他任何操作。