开发者

ASP.NET application developed in 32 bit environment not working in 64 bit environment

We have developed an ASP.NET website on a Windows 7 - 32 bit platform using Visual Studio 2008. This website is being hosted at a hosting company where we share a server with hundreds of other ASP.NET websites.

We are in the process of changing our hosting to a dedicated Windows 2008 - 64 bit server.

We have installed Visual Studio on this new server in order to debug our application.

If we try to start the application on this new server using Visual Studios 2008's own web server (not IIS 7) we get the error below.

We have tried to compile the application in both 32 as well as 64 bit mode. We also tried to compile to "Any CPU". But nothing helps. We also tried running Visual Studio as an administrator but without success.

We get the following error:

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(Assembl开发者_开发问答yInfo 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

Does anyone know why this error appears and how to solve it?


First of all, the error you are getting relates to a missing file, hence the FileNotFoundException. However, you are also getting HRESULT 0x8007007E, which points to a missing unmanaged DLL.

Here's how I would tackle this problem:

  1. Step through the code to find where this exception occurs. With that HRESULT, I'm pretty sure you'll find the exception to be on a line where an unmanaged DLL function is called.
  2. Identify what unmanaged DLL you're trying to use.
  3. Check to see that it's there. First, you should check that any ones you are using are in their right places and are referenced correctly. If that is all OK, make sure that any dependencies they themselves have are there, too.

Also, after you complete step 2, we might be able to help you more if you tell us what type of unmanaged code you're using (i.e., what it might require to run, in terms of its own dependencies).

Hope I helped! :)


The error is not anything to do with processor-specific stuff. It is clearly a missing file that is causing this error. Have you double checked that you have all the required files and assemblies installed on the new dedicated server?


Does anyone of the error information indicate what module could not be found?

If not, verify the deployed bin directory has everything your site has when its working on your test server. Then go through the web.config and make sure all referenced modules are on the target server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜