2010-05-22 117 views
0

我们使用Visual Studio 2008在Windows 7 - 32位平台上开发了ASP.NET网站。此网站托管在托管公司,与数百个其他ASP.NET网站共享服务器。在32位环境下开发的ASP.NET应用程序不能在64位环境中工作

我们正在将我们的主机改为专用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 

有谁知道为什么这个错误出现,该如何解决呢?

回答

1

错误与处理器特定的东西无关。这显然是导致此错误的丢失文件。您是否已经检查过是否已在新的专用服务器上安装了所有必需的文件和程序集?

0

有没有人的错误信息表明什么模块无法找到?

如果不是,请验证部署的bin目录是否包含您的站点在测试服务器上的所有工作。然后通过web.config并确保所有引用的模块位于目标服务器上。

2

首先,您收到的错误与丢失的文件有关,因此为FileNotFoundException。但是,您也得到HRESULT 0x8007007E,它指向丢失的非托管DLL。

这是我会怎么解决这个问题:

  1. 通过代码步骤找到这个地方发生异常。用那HRESULT,我敢肯定你会发现异常是在一个非托管DLL函数被调用的行上。
  2. 确定您尝试使用的非托管DLL。
  3. 检查看看它在那里。首先,你应该检查你正在使用的任何东西是否在正确的位置并且被正确引用。如果一切正常,请确保它们自己拥有的任何依赖关系也在那里。

此外,完成步骤2中,我们也许能帮助你更多,如果你告诉我们你正在使用什么类型的非托管代码(即,它可能需要运行在其自己的条款后依赖)。

希望我帮了忙! :)

相关问题