是否可以在MSBuild中为IIS中的Web应用程序指定启用的协议? [英] Does possibility to specify enabled protocols for web-application in IIS exist in MSBuild?

查看:162
本文介绍了是否可以在MSBuild中为IIS中的Web应用程序指定启用的协议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MSBuild任务在IIS中创建webdirectory:

I create webdirectory in IIS, using MSBuild task:

<WebDirectoryCreate
   VirtualDirectoryName="$(VirtualDirectoryName)"
   VirtualDirectoryPhysicalPath="$(VirtualDirectoryPath)"
   AccessExecute="true"/>

现在我寻找为此webdirectory指定启用协议(http,https,net.tcp)的可能性使用MSBuild。有什么建议吗?

Now I look for possibility to specify enabled protocols (http, https, net.tcp) for this webdirectory using MSBuild. Any suggestion?

推荐答案

没有好运找到任何自定义的MSBuild任务来处理上述动作。无论如何,我仍然可以使用appcmd.exe来执行此操作:

Had no luck to find any custom MSBuild task to handle above described action. Anyway I can still use appcmd.exe in order to do that:

< Exec Command ='%systemroot%\system32 \inetsrv \ appcmd set app默认网站/ WebAppName/enabledProtocols:http,net.pipe,net.tcp'>< / Exec>

<Exec Command='%systemroot%\system32\inetsrv\appcmd set app "Default Web Site/WebAppName" /enabledProtocols:http,net.pipe,net.tcp'></Exec>

实际上我现在甚至找不到案例运行我的msbuild任务的人没有安装appcmd.exe :)嗯...好吧......无论如何......

In fact I can't even find case now where person running my msbuild task has no appcmd.exe installed :) hm... ok... whatever...

这篇关于是否可以在MSBuild中为IIS中的Web应用程序指定启用的协议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆