Developer OneNote

Emma's OneNote for Microsoft Windows, Office and Programming

Could not load type System.ServiceModel.Activation.HttpModule

18 June, 2010 | Category: Development | By: emma

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 (or run on ASP.NET 4.0 application pool).

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′.

Resolution

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.NET\Framework\v4.0.30319
  • %windir%\Microsoft.NET\Framework64\v4.0.30319 (on a 64-bit machine)

No related posts.

Sharath | July 14, 2010

This post is really helpful for me. I was trying since last 3 hours and finally fix that error with your solution.

Thanks

emma | July 15, 2010

Glad you got it working.

Tony | July 22, 2010

I run into same issue. aspnet_regiis.exe -iru fixed my issue.

Write a comment