【问题标题】:how to change advance settings on IIS如何更改 IIS 上的高级设置
【发布时间】:2013-10-10 08:02:04
【问题描述】:

我已经使用 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>

我想为我的 WCF 服务构建一个使用 TCP 绑定的一键式部署批处理文件。

【问题讨论】:

    标签: wcf iis iis-7 web-deployment nettcpbinding


    【解决方案1】:

    我已经使用这个脚本解决了我的问题

     %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
    

    【讨论】:

      猜你喜欢
      • 2013-08-11
      • 1970-01-01
      • 1970-01-01
      • 2014-04-27
      • 1970-01-01
      • 2018-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多