Could not load type System.ServiceModel.Activation.HttpModule

2017-12-11T16:04:42+00:00 July 27th, 2012|Azure, Cloud|


While rebuilding a customers PKI environment we had a problem with one of the Web enrolment servers that I had rebuilt. It was coming up with the following error when you went to Http://localhost/certsrv :

Could not load type ‘System.ServiceModel.Activation.HttpModule’ from
assembly ‘System.ServiceModel, Version=, Culture=neutral,

Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more information about the error and where it originated in the code.

This can be a problem if .Net framework 4.0 has been installed and then .Net 3.0 or 3.5 is enabled.

To resolve this issue, run the following from command line:

aspnet_regiis.exe /iru

The aspnet_regiis.exe file can be found in either

  • %windir%Microsoft.NETFrameworkv4.0.30319
  • %windir%Microsoft.NETFramework64v4.0.30319 (on a 64-bit machine)