asp.net - 无法加载文件或程序集“文件 :///C:\WINDOWS\Microsoft. NET\Framework\v4.0.30319\asp.net vs2010

标签 asp.net .net-assembly .net-framework-version

昨天我的项目运行顺利,但今天我遇到了错误。详细信息如下:

Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms\c8392404\1ba3bab5\App_Web_login.aspx.6cc23264.lmj8uym6.dll' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

异常详细信息:

System.IO.FileLoadException: Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms\c8392404\1ba3bab5\App_Web_login.aspx.6cc23264.lmj8uym6.dll' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

来源错误:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

堆栈跟踪:

[FileLoadException: Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms\c8392404\1ba3bab5\App_Web_login.aspx.6cc23264.lmj8uym6.dll' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132 System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity) +28 System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +93 System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results) +65 System.Web.Compilation.TemplateControlBuildProvider.CreateBuildResult(CompilerResults results) +36 System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results) +16 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +8967378 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +320 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +111 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +125 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +52 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +167 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

版本信息:

Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

为什么我会遇到这个问题以及如何解决它?

最佳答案

尝试执行完整的解决方案构建。如果这不起作用,请单击构建 -> 清理解决方案。如果错误仍然存​​在,请删除 C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\parktms 文件夹中的所有内容,然后重复。

关于asp.net - 无法加载文件或程序集“文件 :///C:\WINDOWS\Microsoft. NET\Framework\v4.0.30319\asp.net vs2010,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10496875/

相关文章:

asp.net - 如何使用 Active Directory 创建具有个人用户帐户的新 .NET 应用程序?

c# - 在运行时动态更改对 dll 的引用

asp.net - 如何在itextsharp中的段落下添加下划线

c# - 类型或命名空间名称 'Syndication' 不存在于命名空间 'System.ServiceModel' 更新到 VS2010 后

asp.net - 如何永远不显示黄色错误页面?

compiler-errors - 为什么我得到System.InvalidProgramException : Common Language Runtime detected an invalid program

c# - 手动加载依赖程序集

visual-studio - 无法定位 .NET Framework 4.6.1

asp.net-mvc - 具有多个用户存储的 Identity Server 4

c# - System.Security.Cryptography 命名空间在 .NET Framework 5.4 中不可用