March 16, 2012

Could not load type 'System.ServiceModel.Activation.HttpModule'

If you install DotNet framework 4.0 on IIS server and then enable DotNet 3.0 or 3.5 WCF features, you might see following error when browse your application site made of ASP.NET 4.0.

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:

  • In 64 bit machine:

            C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis -i
  • Others:

            C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i


No comments:

Post a Comment