Enable net.tcp protocol from Web.config

I have a WCF service with http and net.tcp endpoints. I deployed the service for IIS 7.5 (Server 2008R2), everything works fine.

My question is, is there a way to set the allowed protocols for an IIS application through Web.config ?? Now I have to go to the Application in IIS and manually change additional parameters and add net.tcp to the list of available protocols before activating the service, see Fig. For a screenshot.

IIS Protocol Settings

+6
source share
2 answers

No, this option is not available through web.config. It can be installed either through IIS Manager, like you, or through the command line utility AppCmd.exe, as in the example below:

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

No, this is not a web range setting. This is a web application (application pool) with scope, so it is located in the applicationHost.config file.

+2
source

Source: https://habr.com/ru/post/896922/


All Articles