System.ServiceModel.Activation.HttpModule 错误 [英] System.ServiceModel.Activation.HttpModule error
问题描述
下一行出现此错误的原因是什么?
what is the cause of this error on below line?
<system.web>
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="fa-IR" uiCulture="fa-IR" />
<compilation targetFramework="4.0" debug="true">
<assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
推荐答案
当您在启用 IIS 之前安装 .Net 4,或者在注册 .Net 4 之后注册 WCF 时,会发生这种情况.在任何一种情况下,您的应用程序池都将运行.Net 2.0(如果您已注册 WCF,安装 ASP.Net 3.5,则为 .Net 3 所需的 CLR 版本;如果您在 .Net 4 之后安装了 IIS,则为默认版本).
This happens when you install .Net 4 before enabling IIS, or if you register WCF after registering .Net 4. In either case, your App Pools will be running .Net 2.0 (which is the CLR version required for .Net 3 if you have registered WCF, which installs ASP.Net 3.5, or the default if you have installed IIS after .Net 4)).
网络上有很多关于此的引用,例如MSDN 博客:http://blogs.msdn.com/b/webtopics/archive/2010/04/28/system-typeloadexception-for-system-servicemodel-activation-httpmodule-in-asp-net-4.aspx
There are many references to this on the web, e.g. the MSDN blogs: http://blogs.msdn.com/b/webtopics/archive/2010/04/28/system-typeloadexception-for-system-servicemodel-activation-httpmodule-in-asp-net-4.aspx
修复方法是使用 aspnet_regiis.exe 工具从正确的(32 或 64 位)Framework 文件夹(64 位服务器上的 Framework64)重新注册 ASP.Net 4,例如
The fix is to re-register ASP.Net 4 from the correct (32 or 64 bit) Framework folder (Framework64 on a 64bit server), using the aspnet_regiis.exe tool, e.g.
aspnet_regiis.exe -iru
aspnet_regiis.exe -iru
这篇关于System.ServiceModel.Activation.HttpModule 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!