2010-05-22 55 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中,我們也許能幫助你更多,如果你告訴我們你正在使用什麼類型的非託管代碼(即,它可能需要運行在其自己的條款後依賴)。

希望我幫了忙! :)

相關問題