最近做一个项目,都2个月了出没什么问题,今天用金山清理了一下垃圾就出错了,错误如下“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------系统找不到指定的路径。 (异常来自 HRESULT:0x80070003) 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.DirectoryNotFoundException: 系统找不到指定的路径。 (异常来自 HRESULT:0x80070003)源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  堆栈跟踪: 
[DirectoryNotFoundException: 系统找不到指定的路径。 (异常来自 HRESULT:0x80070003)][FileNotFoundException: 未能加载文件或程序集“System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的路径。][FileNotFoundException: 未能加载文件或程序集“System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的路径。]
   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) +54
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
   System.Reflection.Assembly.Load(String assemblyString) +25
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32[ConfigurationErrorsException: 未能加载文件或程序集“System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的路径。]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +211
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +185
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +350
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
   System.Web.Compilation.BuildManager.CompileCodeDirectories() +525
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +448[HttpException (0x80004005): 未能加载文件或程序集“System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的路径。]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +644[HttpException (0x80004005): 未能加载文件或程序集“System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的路径。]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465427
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +279 
哪位知道怎么解决,帮我看下吧,都弄了3个小时了,急死了

解决方案 »

  1.   

    可能是 某些dll删除了   
      

  2.   

    是不是 dll文件更干了? 或者是删除了什么目录文件。
      

  3.   

    这还是我把项目要的System.EnterpriseServices重新引了一遍,要不vs还运行出错那,哎真是郁闷啊
      

  4.   

    本帖最后由 net_lover 于 2011-10-10 16:15:56 编辑
      

  5.   


    我是在vs2005调试时出的错,这个要动iis么?
      

  6.   

    本帖最后由 net_lover 于 2011-10-10 16:20:50 编辑
      

  7.   

    找到几个GAC我把那个文件复制到GAC2.0里面还GAC本身的文件夹里了,还是不行啊,还是上面的错误啊,急死了,哪位帮帮我啊,在线等啊
      

  8.   

    windows2003应该这样添加
    管理工具-.net 配置-我的电脑-程序集缓存-右键-添加
      

  9.   

    或者使用gacutil 
    方法
    http://msdn.microsoft.com/zh-cn/library/ex0ss12c%28VS.80%29.aspx
      

  10.   

    如果还不行,你可以卸载Microsoft .Net 2.0,重新安装Microsoft .Net 2.0
      

  11.   

    刚才忘记说了,我的系统是win2003的,因为开发用
      

  12.   

    我现在用的是vs2005机器里现在有framwork2.0 、3.0、3.5刚才的错误是在vs2005调试时出现的我卸载2.0可以么?
      

  13.   

    现在我用vs2005调试另外一个项目出现显示详细的编译器输出:
    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceProcess\2.0.0.0__b03f5f7f11d50a3a\System.ServiceProcess.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\e4ce60dc\5443c647\assembly\dl3\87b00d0a\7e3b30e5_1d86cc01\Ajax_use_html.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices.Protocols\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.Protocols.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\e4ce60dc\5443c647\assembly\dl3\67a38ec4\1e476588_3658cc01\FredCK.FCKeditorV2.DLL" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\e4ce60dc\5443c647\App_Web_action.aspx.cdcab7d2.x8kapxeh.dll" /D:DEBUG /debug+ /optimize- /win32res:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\e4ce60dc\5443c647\2v3roaar.res" /w:4 /nowarn:1659;1699;1701  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\e4ce60dc\5443c647\App_Web_action.aspx.cdcab7d2.x8kapxeh.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\e4ce60dc\5443c647\App_Web_action.aspx.cdcab7d2.x8kapxeh.1.cs"
    Microsoft (R) Visual C# 2005 编译器 版本 8.00.50727.1433
    用于 Microsoft (R) Windows (R) 2005 Framework 版本 2.0.50727
    版权所有 (C) Microsoft Corporation 2001-2005。保留所有权利。error CS0006: 未能找到元数据文件“C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll” 
    错误,我郁闷啊不是要生装2005吧,里面好多东西啊,不要啊
      

  14.   

    System.EnterpriseServices.dll丢失。 找一找就行了。不行你在工程里把 System.EnterpriseServices 设置为“复制到本地”
      

  15.   


    2.0下面的
    System.EnterpriseServices.dll
    System.EnterpriseServices.Wrapper.dll
    拷贝到
    C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\
    试试
      

  16.   

    大哥不要啊,重装要配置很多东西啊
    我刚才没找到C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\这个文件夹啊没有只有C:\WINDOWS\Microsoft.NET\assembly\GAC_32这样的文件夹,出错的提示为何是上面的文件夹那?
      

  17.   

    安装.net framework要配置什么啊?
    需要配置吗?