asp.net - 无法加载类型 'System.ServiceModel.Activation.HttpModule'

标签 asp.net iis

我正在运行 aspnet_regiis.exe,但仍然遇到相同的错误:

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. Please 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′.

最佳答案

如果您运行的是 Windows 8,则此方法将不起作用。微软不会让你运行这个命令,告诉你:

This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool.



原因在此链接上:http://support.microsoft.com/kb/2736284 .

对我有用的解决方案发布在此链接上,在 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

关于asp.net - 无法加载类型 'System.ServiceModel.Activation.HttpModule',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15198981/

相关文章:

c# - 在 GridView 模板字段中设置文本框值

asp.net - 防止登录用户访问asp.net mvc 5中的登录页面

ASP.NET MVC Url 路由支持(点)

c# - 为什么 RavenDB 会劫持我的 Nancy 请求?

c# - 同时为自托管 wcf 服务和 IIS 使用端口 443

windows - 如何在 IIS Express 中引用 native 文件?

c# - MySQL 查询永远运行,有什么问题?

javascript - 在 IE11 中出现 Javascript 严重错误

google-chrome - 如何修复 Windows Server 2016 上 IIS 中的 ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY

asp.net-core - 带有 IIS 的 DotNetCore 2.2 应用程序无法工作 - HTTP 错误 500.0 - ANCM 进程内处理程序加载失败