How to programmatically check WCF Http / Non-Http Activation components?

I need to determine if the WCF component's Http / Non-Http activation components are installed during the installation of my product. How can i do this?

Thanks.

+6
windows wix wcf
source share
5 answers

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 API - WASConfigurationAPI

From this page: http://learn.iis.net/page.aspx/135/discover-installed-components/

UPDATE:. Since the above is true, even if 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, WCF activation components without HTTP activation will most likely not be installed. To install them, run the following command:

pkgmgr / iu: WCF-NonHTTP activation

Source: http://blogs.msdn.com/b/drnick/archive/2010/05/11/debugging-a-missing-hostedtransportconfiguration-type.aspx

+4
source

For IIS8 with Windows Server 2012 (and possibly 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 that it is not installed, and 1 tool is installed.

+2
source

You can also use PowerShell to enable the Http / Non-Http activation components for WCF:

 Import-Module ServerManager Add-WindowsFeature NET-HTTP-Activation,NET-Non-HTTP-Activ 

Thus, you do not need to get confused with the Windows registry. For more information about adding a Windows feature using PowerShell: http://technet.microsoft.com/en-us/library/cc732263.aspx#BKMK_powershell

+2
source

You should probably use the Get-WindowsFeature powershell command command. You can check for availability on the 2012 .NET Framework 4.5 WCF Services server to activate HTTP by calling:

 $wcfActivationFeature = Get-WindowsFeature -name NET-WCF-HTTP-Activation45 $wcfActivationFeature.Installed 
+1
source

The registry key for activating HTTP HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ NET Framework \ NDP \ v3.0 \ Setup \ Windows Communication Foundation \ HTTPActivation and for activating without HTTP checks whether the NetTcpActivation or NetPipeActivator service exists and is running on the computer.

0
source

All Articles