asp.net-mvc – 不应加载引用程序集以执行
发布时间:2020-09-06 01:08:03 所属栏目: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 – 无法在UpdatePanel中下载文件
- asp.net-mvc – ASP.NET MVC 3 Treeview
- asp.net – 为什么HttpContext.Current.User.Identity.Name
- asp.net-mvc – 在Controller操作方法中重用代码的最佳方法
- 如何在ASP.NET MVC中配置3个级别的URL?
- asp.net-mvc – ASP.NET MVC现在是“开源”.这是一件好事吗
- asp.net-mvc – 如何从mvc中的控制器中设置隐藏字段的值
- asp.net – MVC4 – ContextDependentView – 这是什么意思
- asp.net – 在MVC 4.0中使用部分视图中的节
- asp.net-mvc – 使用Viewbag绑定DropdownlistFor
推荐文章
站长推荐
- 在对ASP.NET MVC Action的AJAX请求期间有网络请求
- asp.net-mvc – 如何使用ASP.NET MVC ApiControl
- asp.net – 适用于多个用户的EWS通知中心
- asp.net-mvc – 在ASP.NET MVC中添加服务引用4
- Asp.Net的FileUpload类实现上传文件实例
- 如何排序. .NET中的resx(资源文件)
- ASP.Net WebAPI与Ajax进行跨域数据交互时Cookies
- asp.net-mvc – 使用html.actionlink将模型从视图
- asp.net-mvc – 如何使用selenium进行ASP.NET MV
- ASP.Net下载大文件的实现方法
热点阅读