Enable net.tcp protocol from Web.config
Asked Answered
L

2

6

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 protocols 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.

IIS Protocol Settings

Lamp answered 8/9, 2011 at 20:47 Comment(2)
See meta.stackexchange.com/questions/2950/…Norseman
@John, fixed according to the link.Lamp
V
2

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
Voorhees answered 8/9, 2011 at 21:17 Comment(2)
I see, do you have more insight as to why?Lamp
See the response from x0n for the reason.Voorhees
M
2

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

Margemargeaux answered 9/9, 2011 at 2:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.