asp.net-mvc – 不应加载引用程序集以执行
发布时间:2020-09-06 03:31:01 所属栏目: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-mvc-3 – 如何在Razor视图引擎中注册程序集
- .net – 如何正确处理n层应用程序中的错误?
- 增加ASP.NET站点的executionTimeout和maxRequestLength是否
- 什么是在asp.net中301重定向更推荐的方法?
- asp.net-mvc – ASP.NET MVC忽略所有url结尾的“.html”
- asp.net – $(“#dialog”).parent().appendTo($(“form:f
- 有没有办法将内部控件放在ASP.NET自定义控件中?
- .NET WebApi jsonapi.org支持
- asp.net – OutOfMemoryException当发送大文件500MB使用Fil
- ASP.NET Response.Cache.SetNoStore()与Response.Cache.Set
推荐文章
站长推荐
- asp.net-mvc – MVC“添加控制器”是“无法检索元
- ASP.NET JSON字符串与实体类的互转换示例代码
- asp.net-mvc – MVC应用程序中的随机数生成
- 我应该在ASP.NET MVC中构建我的下一个Web应用程序
- asp.net – 菜单控件生成的js导致Web窗体中的Sys
- asp.net – WebForm_DoCallback定义
- asp.net 根据汉字的拼音首字母搜索数据库(附 LIN
- 从app_data中删除文件夹时如何防止asp.net重新编
- asp.net-web-api – ASP身份OAuth令牌 – 我应该
- ASP.NET VNext类库System.Runtime.Serialization
热点阅读