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

10,432

Solution 1

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

Solution 2

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.

Share:
10,432
Dmitrii
Author by

Dmitrii

Updated on June 17, 2022

Comments

  • Dmitrii
    Dmitrii almost 2 years

    I need to detect if WCF Http/Non-Http Activation Components is installed during the installation of my product. How can I do so?

    Thanks.

  • Dmitrii
    Dmitrii over 13 years
    Unfortunately, this is not helpful. These three values exist in registry (and equal 1) independently of the http/non-http activation components are installed. (Windows Server 2008R2)
  • DarrellNorton
    DarrellNorton over 13 years
    How about checking to see if the "Windows Process Activation Service" exists and the status is Started?
  • Dmitrii
    Dmitrii over 13 years
    Thanks, I'll try and write about the results. )
  • Dmitrii
    Dmitrii over 13 years
    Good! It is exactly what I need! Thank you, Darrel!
  • Tung
    Tung about 9 years
    The key exists for 2012, but not for Windows 8