日期:2014-05-18  浏览次数:20535 次

未能加载文件或程序集“XXXXXXX”或它的某一个依赖项。另一个程序正在使用此文件,进程无法访问。 (异常来自 HRESULT:0x8007002
环境:VS2008 Team 版本,.Net Framework 版本3.5 SP1,PC是XP系统
编译通过,有时候能打开页面,有时打开网页显示以下内容:查看进程也没有看到,遇到此问题的帮忙解答一下,谢谢!

未能加载文件或程序集“QAZ.ATM.Common”或它的某一个依赖项。另一个程序正在使用此文件,进程无法访问。 (异常来自 HRESULT:0x80070020) 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.IO.FileLoadException: 未能加载文件或程序集“QAZ.ATM.Common”或它的某一个依赖项。另一个程序正在使用此文件,进程无法访问。 (异常来自 HRESULT:0x80070020)

源错误: 

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

程序集加载跟踪: 下列信息有助于确定程序集“QAZ.ATM.Common”无法加载的原因。


=== 预绑定状态信息 ===
日志: 用户 = LIHUIPING\Administrator
日志: DisplayName = QAZ.ATM.Common
 (Partial)
日志: Appbase = file:///F:/ATM/qaz.atm-server-20120326/QAZ.ATM/
日志: 初始 PrivatePath = F:\ATM\qaz.atm-server-20120326\QAZ.ATM\bin
调用程序集: (Unknown)。
===
日志: 此绑定从 default 加载上下文开始。
日志: 正在使用应用程序配置文件: F:\ATM\qaz.atm-server-20120326\QAZ.ATM\web.config
日志: 使用 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config 的计算机配置文件。
日志: 此时没有为引用应用策略(私有、自定义、分部或基于位置的程序集绑定)。
日志: 相同的绑定已出现过,因 hr = 0x80070020 而失败。

 

堆栈跟踪: 


[FileLoadException: 未能加载文件或程序集“QAZ.ATM.Common”或它的某一个依赖项。另一个程序正在使用此文件,进程无法访问。 (异常来自 HRESULT:0x80070020)]
  System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
  System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
  System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
  System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
  System.Reflection.Assembly.Load(String assemblyString) +28
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: 未能加载文件或程序集“QAZ.ATM.Common”或它的某一个依赖项。另一个程序正在使用此文件,进程无法访问。 (异常来自 HRESULT:0x80070020)]
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
  System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
  System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
  System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
  System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
  System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
  System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
  System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +83
  System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
  System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
  System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
  System.Web.Comp