我已经使用msdeploy.exe构建了WCF服务部署程序包,但是我想在安装时更改IIS中已为我的站点启用的协议,我该如何实现呢?
我尝试从myservice.setParameters.xml进行设置,但未成功
<?xml version="1.0" encoding="utf-8"?>
<parameters>
<setParameter name="IIS Web Application Name" value="Default
Website/myService" />
<setParameter name="EnabledProtocols" value="net.tcp" />
</parameters>
我想为使用TCP绑定的WCF服务构建一键式部署批处理文件。
我已经使用此脚本解决了我的问题
%windir%\system32\inetsrv\appcmd.exe set site "Default Web Site" -+bindings.
[protocol='net.tcp',bindingInformation='808:*']
%windir%\system32\inetsrv\AppCmd add app /site.name:"Default Web Site" /path:/testsite1
/physicalPath:"C:\inetpub\wwwroot\testsite1"
%windir%\system32\inetsrv\appcmd.exe set app "Default Web Site/testsite1"
/enabledProtocols:http,net.tcp
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句