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

前端 未结 14 573
挽巷
挽巷 2020-12-04 07:37

I\'m running my Web Project in IIS.

It is a 4.0 Framework APP.

I have a Service.svc and I get this error when I run my Application.

\"

相关标签:
14条回答
  • 2020-12-04 08:12

    From the Server Manager's Features node, you can also remove some of the sub-items under the .NET Framework 3.5.1 Features that are installed by the activation of some of the other roles.

    For instance, removed the WCF Activation Features as follows and our websites came back:

    • [x] .NET Framework 3.5.1 Features
      • [x] .NET Framework 3.5.1
      • [ ] WCF Activation
        • [ ] HTTP Activation
        • [ ] Non-HTTP Activation

    Note: this did not require a restart for us.

    0 讨论(0)
  • 2020-12-04 08:16

    delete the module which is identified in .Net error message , 1 down vote

    In Windows server 2012. Go to ISS -> Modules -> Remove the ServiceModel3-0. (without number worked for me)

    0 讨论(0)
  • start-> Run--> c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -iru

    0 讨论(0)
  • 2020-12-04 08:22

    In Windows server 2012. Go to ISS -> Modules -> Remove the ServiceModel3-0.

    0 讨论(0)
  • 2020-12-04 08:25

    Ok, finally got it.

    Change this line in %windir%\System32\inetsrv\Config\ApplicationHost.config

    <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
    

    To

    <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
    

    If this is not enough

    Add this following line to the Web.config

    <system.webServer>
      <modules runAllManagedModulesForAllRequests="true"/>
    </system.webServer>
    
    0 讨论(0)
  • 2020-12-04 08:26

    I am late, hope it will help someone ....This is a known issue with IIS 8.0

    The solution is to delete the 3.x module and handler from IIS manager. You could delete them at the application or site level if you want to keep them in applicationHost.config. But I wanted to delete them from applicationHost.config. do the following steps:

    In IIS manager, click the machine name node. In “Features View”, double-click “Modules”. Find “ServiceModel” and remove it. Image 1 for Solve IIS 8 Error: Could not load type ‘System.ServiceModel.Activation.HttpModule’

    Go back to the machine name node’s “Features View”, double-click “Handler Mappings”. Find “svc-Integrated” and remove it. Image 2 for Solve IIS 8 Error: Could not load type ‘System.ServiceModel.Activation.HttpModule’

    0 讨论(0)
提交回复
热议问题