未能从程序集“System.ServiceModel”中加载类型“System.ServiceModel.Activation.HttpModule”。
程序 类型 加载 system 未能
2023-09-14 09:03:17 时间
“/TestService”应用程序中的服务器错误。
未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, P
EF Core新增迁移时无法加载程序集“System.ValueTuple”的错误 EF Core使用迁移命令时,如: Add-Migration Init 有时会出现如下错误: System.IO.FileLoadException: Could not load file or assembly System.
作者:jiankunking 出处:http://blog.csdn.net/jiankunking
在Windows Server 2008中的IIS服务器中部署WCF服务程序时,通过浏览器访问报出如下错误:
“/TestService”应用程序中的服务器错误。 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.TypeLoadException: 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。 源错误: 执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪: [TypeLoadException: 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。] System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +153 System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +63 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +124 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +76 [ConfigurationErrorsException: 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。] System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +12788096 System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +69 System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +66 System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +300 System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1262 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +133 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475 [HttpException (0x80004005): 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12981028 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12820621 版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34280
原因:
这是因为先安装了 .NET Framework 4,随后启用了 .NET Framework 3.5 WCF HTTP 激活,则会发生此错误。
解决办法:
微软官方对该问题也作了解答:http://msdn.microsoft.com/zh-cn/library/aa751852.aspx
只需要已管理员用户在cmd中运行aspnet_regiis.exe -i即可。
C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/aspnet_regiis.exe -i
EF Core新增迁移时无法加载程序集“System.ValueTuple”的错误 EF Core使用迁移命令时,如: Add-Migration Init 有时会出现如下错误: System.IO.FileLoadException: Could not load file or assembly System.
相关文章
- 微信小程序_简单组件使用与数据绑定
- 微信小程序怎么获取page/index/main后面的参数
- Spark之wordcount程序(Java Scala)
- 命名空间“HaiChuang.AMAC”中不存在类型或命名空间名称“WCFClient”。是否缺少程序集引用?
- 【不是问题的问题】为什么复位中断服务程序里面直接调用的main函数,难道所有程序都在复位中断里面执行的?
- H7-TOOL的LUA小程序教程第1期:LUA编辑器,LUA测试环境搭建,调试方法
- 命名空间“HaiChuang.AMAC”中不存在类型或命名空间名称“WCFClient”。是否缺少程序集引用?
- 命名空间“HaiChuang.AMAC”中不存在类型或命名空间名称“WCFClient”。是否缺少程序集引用?
- uni-app微信小程序报错:更改appid失败touristappid Error:tourist appid
- 利用低码技术快速创建一款发票小程序
- java程序调用xfire发布的webService服务
- 练习 2-1 编写一个程序以确定分别由signed及unsigned限定的char、short、int与long类型变量的取值范围。
- 【Android 逆向】Android 逆向通用工具开发 ( Android 平台运行的 cmd 程序类型 | Android 平台运行的 cmd 程序编译选项 | 编译 cmd 可执行程序 )
- C# 程序性能提升篇-2、类型(字段类型、class和struct)的错误定义所影响性能浅析
- (28)部署强命名程序集到GAC
- 17. 打包Python程序发布
- C# winform 启动外部程序
- AWT是Java基础类 (JFC)的一部分,为Java程序提供图形用户界面(GUI)的标准API
- 定义,并且找不到可接受类型为“ASP._aspx”的第一个参数的扩展方法“”(是否缺少 using 指令或程序集引用?)
- Servlet | Servlet原理、开发第一个带有Java小程序Servlet
- C++的学习心得和知识总结 第一章|进程的虚拟地址空间 函数调用堆栈和程序编译链接原理