IIS error: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel’
The last months my laptop started to act strange, 2 or 3 random crashes a day, USB ports that started to fail, extreme CPU usage and so on… And yes, all doctors gave the same diagnosis, my pc was dying. So I took a backup almost every day until it finally happened, one final crash and my system was gone.
After getting a new laptop I started to reconfigure my development environment. After installing IIS I tried to open an existing WCF service and was welcomed by the following yellow screen of death:
“Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.”
This error occured because I installed IIS the .NET Framework 4.
Solving this problem isn’t hard, just open up the ASP.NET IIS Registration Tool (Aspnet_regiis.exe,) to register the correct version of ASP.NET. This can be accomplished by using the –iru parameters when running aspnet_regiis.exe as follows:
aspnet_regiis.exe –iru
That’s it!