我们使用Visual Studio 2008在Windows 7 - 32位平台上开发了一个ASP.NET网站。该网站托管在托管公司,我们与数百个其他ASP.NET网站共享服务器。
我们正在将托管更改为专用的Windows 2008 - 64位服务器。
我们已在此新服务器上安装Visual Studio以调试我们的应用程序。
如果我们尝试使用Visual Studios 2008自己的Web服务器(而不是IIS 7)在这台新服务器上启动应用程序,我们会收到以下错误。
我们尝试在32位和64位模式下编译应用程序。我们还尝试编译为“任何CPU”。但没有任何帮助。我们还尝试以管理员身份运行Visual Studio,但没有成功。
我们收到以下错误:
Server Error in '/' Application. The specified module could not be found. (Exception from HRESULT: 0x8007007E) 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. Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) Source Error: 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. Stack Trace: [FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)] 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: The specified module could not be found. (Exception from HRESULT: 0x8007007E)] 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.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232 System.Web.Compilation.BuildManager.CompileGlobalAsax() +51 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337 [HttpException (0x80004005): The specified module could not be found. (Exception from HRESULT: 0x8007007E)] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729 [HttpException (0x80004005): The specified module could not be found. (Exception from HRESULT: 0x8007007E)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8897659 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
有谁知道为什么会出现此错误以及如何解决?
答案 0 :(得分:2)
首先,您获得的错误与丢失的文件有关,因此FileNotFoundException
。但是,您还得到HRESULT 0x8007007E
,它指向缺少的非托管DLL。
以下是我将如何解决这个问题:
HRESULT
,我非常确定您会在调用非托管DLL函数的行上找到异常。此外,在完成第2步之后,如果您告诉我们您正在使用哪种类型的非托管代码(例如,根据其自身的依赖关系可能需要运行的代码),我们可能会帮助您。
希望我帮忙! :)
答案 1 :(得分:1)
错误与处理器特定的内容无关。它显然是一个导致此错误的丢失文件。您是否仔细检查过您是否在新的专用服务器上安装了所有必需的文件和程序集?
答案 2 :(得分:0)
是否有任何错误信息表明无法找到哪个模块?
如果没有,请验证部署的bin目录是否包含您的站点在测试服务器上运行时的所有内容。然后浏览web.config并确保所有引用的模块都在目标服务器上。