开发者

Enable net.tcp protocol from Web.config

开发者 https://www.devze.com 2023-04-04 03:13 出处:网络
I have WCF service that has http and net.tcp endpoints. I have deployed the service to IIS 7.5 (Server 2008R2), everything is working good.

I have WCF service that has http and net.tcp endpoints. I have deployed the service to IIS 7.5 (Server 2008R2), everything is working good.

My question is this, is there a way to set enabled protoc开发者_JAVA技巧ols for the IIS application through Web.config?? Right now I have to go to the Application in IIS and manually change the Advanced settings and add net.tcp to the list of available protocols before the service can be activated, see pic for the screenshot.

Enable net.tcp protocol from Web.config


No, this setting isn't available via web.config. It can be set either via the IIS Manager as you're doing, or via the AppCmd.exe command-line utility, as in the example below:

%windir%\system32\inetsrv\appcmd.exe set app "Default Web Site/FirstWcfHost" /enabledProtocols:http,net.tcp


No, this is not a web-scoped setting. It is web application (app pool) scoped one, so it is in the applicationHost.config file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号