How to programmatically check WCF Http/Non-Http Activation components?
For IIS7, check the following Registry Key:
HKEY_LOCAL_MACHINE\Software\Microsoft\InetStp\Components\
For the following components:
- Process Model - ProcessModel
- .NET Environment - NetFxEnvironment
- Configuration APIs - WASConfigurationAPI
From this page: http://learn.iis.net/page.aspx/135/discover-installed-components/
UPDATE: Since the above is true even when the components are not installed, try running this command from the command line:
sc query nettcpactivator
If the service is stopped or does not exist, the WCF Non-HTTP Activation components are likely not installed. To install them, run this command:
pkgmgr /iu: WCF-NonHTTP-Activation
Source: http://blogs.msdn.com/b/drnick/archive/2010/05/11/debugging-a-missing-hostedtransportconfiguration-type.aspx
For IIS8 with Windows Server 2012 (and probably Windows 8), you can check this registry key (for .NET 4.5)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager\ServicingStorage\ServerComponentCache\NET-WCF-HTTP-Activation45\InstallState
zero means not installed, and 1 means installed.
You also can use PowerShell to enable WCF Http/Non-Http Activation components:
Import-Module ServerManager
Add-WindowsFeature NET-HTTP-Activation,NET-Non-HTTP-Activ
This way you do not have to mess up with Windows Registry. For more info about adding Windows feature with PowerShell: http://technet.microsoft.com/en-us/library/cc732263.aspx#BKMK_powershell