Oct 28, 2011

Fix IIS error System.ServiceModel.Activation.HttpModule

 

If you hit this error, probably you are install .NET 4.0 after you installed IIS:

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


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.


Exception Details: System.TypeLoadException: Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.

Solution:

Just run this command from Visual Studio Command Prompt:

aspnet_regiis.exe /i

The aspnet_regiis.exe is in

  • %windir%\Microsoft.NET\Framework\v4.0.30319
  • %windir%\Microsoft.NET\Framework64\v4.0.30319 (on a 64-bit machine)

No comments:

Post a Comment