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

前端 未结 8 1612
不思量自难忘°
不思量自难忘° 2020-12-28 19:32

I am run aspnet_regiis.exe, still I am getting same error:

Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.Ser

8条回答
  •  我在风中等你
    2020-12-28 20:09

    I got the same error after upgrading the IIS server to .NET 4.5.1 (previously .NET 4.0 was installed). In my case, running aspnet_regiis with the parameter -iru fixed the problem, ie.

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

    Note: on a 64bit system you should use

    %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis -iru
    

    Notes:

    • .NET 4.0 and higher (e.g. 4.5.1) all installs into v.4.0.30319, this has changed compared to earlier versions (you will not find a v4.5 folder). To get the installed .NET framework versions, see this answer.

    • The cause of this error is described here, If you want to check manually, I cite the following from this article:

    This issue occurs because the Applicationhost.config file for Windows Process Activation Service (WAS) has the following section defined, and this section is incompatible with the .NET Framework 4.0:

    This section should be defined as follows (notice the preCondition):

    
    

    Note: You can find the Applicationhost.config file in the following location: %windir%\system32\inetsrv\config

提交回复
热议问题