Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7 Enabled Protocols

Tags:

iis-7

I have a win 2008r2 server. The default website has Enabled Protocols set to "http,net.tcp". When any new applications are created under the default website I would like then to default to having the same enabled protocols. Could anyone please advise how to do this? Currently when I Add Application one is created with an enabled protocol of only "http"

like image 921
Rob Bowman Avatar asked Sep 11 '12 10:09

Rob Bowman


2 Answers

I found this was possible using the IIS provider for Powershell. The following line worked for me:

Set-ItemProperty IIS:\sites\$NetTcpWebsite -name EnabledProtocols -Value "http,net.Tcp"

like image 119
Rob Bowman Avatar answered Oct 15 '22 22:10

Rob Bowman


In order to get the protocols to cascade from the website level down to the application level I had to do the following:

First I created the website and the applications. Second I ran the following:

$iisAppName = %YourWebsiteName%
Set-ItemProperty IIS:\sites\$iisAppName -name applicationDefaults.enabledProtocols -Value "http,net.tcp"

That solved it for the original question. The answer from Rob will only set the Enabled Protocols profile at the website level which leaves your applications and virtual directories without the proper protocols enabled.

like image 43
Keith Hodo Avatar answered Oct 15 '22 22:10

Keith Hodo