How to programmatically check WCF Http/Non-Http Activation components?
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
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.
Dmitrii
Updated on June 17, 2022Comments
-
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 over 13 yearsUnfortunately, 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 over 13 yearsHow about checking to see if the "Windows Process Activation Service" exists and the status is Started?
-
Dmitrii over 13 yearsThanks, I'll try and write about the results. )
-
Dmitrii over 13 yearsGood! It is exactly what I need! Thank you, Darrel!
-
Tung about 9 yearsThe key exists for 2012, but not for Windows 8