This error occurs when you install the .NET Framework using .NET 3.5 on top of CLR 2.0, including HTTP activation on a Windows 2012 or 2012 R2 server that already has .NET framework 4.5 installed.
In our case, the proposed fixes do not work.
We had a CLR 4.0 website that showed an error:
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Removing and re-adding ASP.NET 4.5 features did not matter.
We had to remove and add 3.5 again using DISM:
Dism /online /Disable-Feature /FeatureName:WCF-HTTP-Activation Dism /online /Enable-Feature /FeatureName:WCF-HTTP-Activation
You can also use PowerShell:
Remove-WindowsFeature -Name NET-HTTP-Activation Add-WindowsFeature -Name NET-HTTP-Activation
CarlR source share