asp.net-mvc – 不应加载引用程序集以执行
发布时间:2020-05-22 15:33:37 所属栏目:asp.Net 来源:互联网
导读:当我尝试在Visual Studio中调试它时,我的网站突然抛出此错误消息.如果我部署网站,它的工作没有任何错误. 任何解决此错误的建议. [ConfigurationErrorsException: Could not load file or assembly Microsoft.Win32.Primitives or one of its dependencies. Re
|
当我尝试在Visual Studio中调试它时,我的网站突然抛出此错误消息.如果我部署网站,它的工作没有任何错误. 任何解决此错误的建议. [ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Win32.Primitives' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName,Boolean starDirective) +738 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +217 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +92 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath,Boolean& isRefAssemblyLoaded) +290 System.Web.Compilation.BuildManager.ExecutePreAppStart() +157 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager,IApplicationHost appHost,IConfigMapPathFactory configMapPathFactory,HostingEnvironmentParameters hostingParameters,PolicyLevel policyLevel,Exception appDomainCreationException) +531 [HttpException (0x80004005): Could not load file or assembly 'Microsoft.Win32.Primitives' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9946132 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext context) +261 解决方法尝试从web.config中删除该部分<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
</dependentAssembly> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net – Session_End不启动?
- asp.net-mvc – ASP.NET MVC5/IIS Express无法调试 – 代码
- ASP.NET 2.0 JQuery AJAX登录
- asp.net – 部分视图呈现按钮点击
- asp.net – 只能将一个ScriptManager实例添加到页面中
- .net – SignalR长轮询在5秒内断开连接
- asp.net-mvc – ASP.NET MVC将表单值传递给action方法
- asp.net-mvc – 依赖注入和ASP.Net成员提供程序
- asp.net – 使用IIS7应用程序请求路由修改标头
- asp.net – Kestrel和Katana之间的区别
推荐文章
站长推荐
- asp.net – 如何在StackedBar中值为零时隐藏数据
- asp.net-mvc-4 – 实体框架代码第一个多对多关系
- asp.net-core – “netcoreapp1.0”是一个不受支
- asp.net – Visual Studio 2013更改现有项目的身
- asp.net-mvc-4 – IE中的MVC VS2012 jquery.vali
- asp.net-web-api – SignalR响应覆盖标头
- asp.net – 如何获取HttpPostedFileBase文件的大
- asp.net – 从MVC视图中的模型访问displayName属
- asp.net核心身份提取并保存外部登录令牌并添加对
- asp.net-mvc – Automapper映射到嵌套类
热点阅读
