位置: 编程技术 - 正文
推荐整理分享win8 Could not load type System.ServiceModel.Activation.HttpModule 错误解决方案 ,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ba5ce'. 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=ba5ce'.
Cause
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:
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ba5ce" preCondition="managedHandler" />
This section should be defined as follows:
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ba5ce" preCondition="managedHandler,runtimeVersionv2.0" />
Note You can find the Applicationhost.config file in the following location:
%windir%systeminetsrvconfig
Resolution
To resolve this issue, run the following command line:
aspnet_regiis.exe /iru
The Aspnet_regiis.exe file can be found in one of the following locations:
%windir%Microsoft.NETFrameworkv4.0.
%windir%Microsoft.NETFrameworkv4.0. (on a -bit computer)
注意
以上方案在win8系统中无效,因为在最后一步运行 aspnet_regiis.exe /iru 命令时会失败,所以解决方案是找到 Applicationhost.config 文件(目录在%windir%systeminetsrvconfig),然后把文件中的:
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ba5ce" preCondition="managedHandler" />
改为:
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ba5ce" preCondition="managedHandler,runtimeVersionv2.0" />
我目前只找到这种方案,如果有更好方案欢迎指出。作者:Artwl 出处:
如何关闭Win8系统更改计算机的消息通知 微软今日向Windows8或WindowsServer用户推送了首个Windows8软件更新包。为了系统安全,Windows8延续了Windows7的更改计算机就会有提示信息弹出功能。如果你
如何解决Windows 8在桌面上总是显示大小写锁定和数字锁定图标的问题 Windows8发布预览版ThinkPad及部分LenovoVVLenovoBB昭阳KE等商务机型知识点分析:取消屏幕上显示的CapsLock以及NumLock切换时的提示图标。操作步骤:没
让Win8文件资源管理器显示全路径的设置方法 Win8文件资源管理器窗口中文件路径的显示方式为只显示当前窗口文件所在文件夹的名称,如果你觉得不喜欢,想要显示该文件的完整路径?没问题,小
标签: win8 Could not load type System.ServiceModel.Activation.HttpModule 错误解决方案
本文链接地址:https://www.jiuchutong.com/biancheng/366551.html 转载请保留说明!友情链接: 武汉网站建设