Error on ASP website: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly

Refers to:

  • Plesk 11.5 for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.5 for Windows

Created:

2016-11-16 13:05:26 UTC

Modified:

2017-02-18 20:48:14 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Error on ASP website: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly

Symptoms

Error while accessing website on 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'

Switching ASP.NET to 2.0 in Plesk > Website > Website Scripting and Security results in another error.

Cause

  • ASP.NET 4 is not properly registered in IIS
  • Incorrect web.config file for the corresponding domain ( C:\\Inetpub\\vhosts\\example.com\\httpdocs\\web.config ). It contains information about the invalid ASP.NET version (e.g. ASP.NET 3.5, although the site is using the ASP.NET 4)

Resolution

  1. Switch website back to ASP.NET 4.0
  2. Re-register ASP.NET 4.0 module in ISS using this command in CMD :

    c:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\aspnet_regiis.exe -iru
  3. Restart IIS

    iisreset
    1. Check the web.config file. If it is corrupted, replace it with the web.config file from the old server.

Otherwise, this issue can be resolved by adding the following string to the web.config file:

<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
Have more questions? Submit a request
Please sign in to leave a comment.