asp.net-mvc – 不应加载引用程序集以执行
发布时间:2020-09-18 17:03:02  所属栏目: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可以存储会话状态的唯一方法吗?
 - asp.net-mvc-4 – 如何开发一个ASP.NET Web API接受一个复杂
 - asp.net-mvc-3 – MVC3非顺序索引和DefaultModelBinder
 - asp.net-mvc – ASP.NET MVC会话超时,绝对还是滑动?
 - asp.net-mvc-3 – System.Web.Mvc.HandleErrorInfo错误的模
 - asp.net – 在Application_BeginRequest中设置会话变量
 - asp.net-core – 编译netcoreapp1.0,代码包含#if!NETSTAND
 - 如何通过Asp.net WebAPI中的异常过滤器传递内容?
 - asp.net – 脚本标签和链接标签进入asp:内容或外部
 - asp.net-mvc – 保存后显示相同的页面
 
推荐文章
            站长推荐
            - asp.net – IIS Web Garden中的Singleton对象
 - asp.net-mvc-3 – 如何关闭我的整个ASP.NET MVC
 - asp.net-mvc – WebService还是一个简单的MVC控制
 - asp.net下文件上传和文件删除的代码
 - asp.net-core – 如何在Visual Studio 2015 RC中
 - asp.net – 无法返回JsonResult
 - 如果我的Asp.Net会话有IsNewSession == true,那我
 - asp.net-mvc – 在MVC Action中将SSRS报告导出为
 - 具有多个ASP.NET Web应用程序的Visual Studio解决
 - asp.net – 如何在gridview中将navigateurl添加到
 
热点阅读
            