Could not load type 'System.ServiceModel.Activ

2019-01-12 20:41发布

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.

"Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'"

I tried this --> aspnet_regiis.exe -iru which I found in a lot of forums and it didn't solve my problem.

Does anyone know another method ?

标签: iis service svc
12条回答
老娘就宠你
2楼-- · 2019-01-12 21:25

Details

http://msdn.microsoft.com/en-us/library/hh169179(v=nav.71).aspx

"This error can occur when there are multiple versions of the .NET Framework on the computer that is running IIS..."

查看更多
唯我独甜
3楼-- · 2019-01-12 21:29

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)

查看更多
乱世女痞
4楼-- · 2019-01-12 21:33

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.

查看更多
闹够了就滚
5楼-- · 2019-01-12 21:36

Try with

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

When multiple versions of the .NET Framework are executing side-by-side on a single computer, the ASP.NET ISAPI version mapped to an ASP.NET application determines which version of the common language runtime (CLR) is used for the application.

Above command will Installs the version of ASP.NET that is associated with Aspnet_regiis.exe and only registers ASP.NET in IIS.

https://support.microsoft.com/en-us/help/2015129/error-message-after-you-install-the--net-framework-4-0-could-not-load

查看更多
Animai°情兽
6楼-- · 2019-01-12 21:36

Hello Thanks for the question; To resolve: "Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'"

In Windows Features check all for .NET 4 Advanced Services & .NET 3.5

enter image description here

Just like Nicolas Gago I tried aspnet_regiis.exe -iru but it didn't work. After the features were on then it yellow screen error was gone. Thanks;

查看更多
Luminary・发光体
7楼-- · 2019-01-12 21:38

I have Windows 8 installed on my machine, and the aspnet_regiis.exe tool did not worked for me either.

The solution that worked for me is posted on this link, on the answer by Neha: System.ServiceModel.Activation.HttpModule error

Everywhere the problem to this solution was mentioned as re-registering aspNet by using aspnet_regiis.exe. But this did not work for me.

Though this is a valid solution (as explained beautifully here)

but it did not work with Windows 8.

For Windows 8 you need to Windows features and enable everything under ".Net Framework 3.5" and ".Net Framework 4.5 Advanced Services".

Thanks Neha

查看更多
登录 后发表回答