Wednesday, November 10, 2010

Could not load type System.ServiceModel.Activation.HttpModule

 

Just faced one problem with my Windows Server 2008 R2 server while configuring my Silverlight WCF application for demo…

my application was working fine on my localhost and it fail to start when I uploaded to my demo server, and I got following error message…

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

This error can occur when IIS is installed after installing .NET Framework 4, or if the 3.0 version of the WCF Http Activation module is installed after installing IIS and .NET Framework 4.

simplest solution to resolve this issue, run the following from command line:

aspnet_regiis.exe /iru

you can locate aspnet_regiis.exe at

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

2 comments:

Highlander said...

thanks. It has helped.

Anonymous said...

To fix this bug on Windows 8, you need to open Windows features and enable everything under ".Net Framework 3.5" and ".Net Framework 4.5 Advanced Services".