Could not load type ‘System.ServiceModel.Activation.HttpModule’

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

Taki błąd pojawia się jeśli instalujemy IIS i .NET Framework w odwróconej kolejności, a mianowicie wtedy, kiedy IIS jest instalowany po zainstalowaniu .NET Framework, albo jeśli WCF Http Activation moduł jest instalowany po zainstalowaniu IIS i .NET Framework.
Problem ten można rozwiązać za pomocą ASP.NET IIS Registration Tool (aspnet_regiis.exe) .
Należy uruchomić to polecenie z parametrami -iru:

aspnet_regiis.exe -iru

Dodatkowo przydatne może okazać się również poniższe polecenie:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>ServiceModelReg.exe -r
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s