开发者

problems running x86 Asp.net application on 64-bit windows with IIS7.5

I'm currently in the process of preparing a new server to run our ASP.Net platform on. For the first time I'm doing the installation on a 64-bit Windows (2008 R2), and with IIS7.5 (before that always 7.0). Our website is built in x86, so I've enabled the application pools to use 32-bit applications.

I'm stuck at the following error which I get when I browse the website:

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.BuildProvidersCompile开发者_Python百科r..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54

   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600

   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125

   System.Web.Compilation.BuildManager.EnsureFirstTimeDirectoryInit(VirtualPath virtualDir) +8803959

   System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode) +219

   System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath) +43

   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +59

   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101

   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126

   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62

   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33

   System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37

   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

I've used fuslogvw to track down any .Net binding errors: 4 assemblies showed up, but I get the same 4 on our regular server when browsing the site for the first time. The assemblies are CppCodeProvider, VJSharpCodeProvider and two of our *.resources files. I've looked into these, and I don't think they are the cause of this problem, certainly not after finding out a working environment has the same missing assemblies in fuslogvw.

Next up I used Dependency Walker to study the website's main DLL. Nothing seems to be missing, but I get the following message:

* Error: Modules with different CPU types were found.

I don't think this is an issue also because my .Net assembly is x86 and all the other dependencies are x64.

So I really want to know what missing "module" ASP.Net is complaining about.


This solved my problem: I had to place the msvcr71.dll in c:\windows\system32 and c:\windows\syswow64.


I solved the problem by setting Enable 32 bit program to True under advanced setting tab of App Pool.

problems running x86 Asp.net application on 64-bit windows with IIS7.5


(source: zizhujy.com)

Details in this blog post


I had a similar problem recently when putting a 4.0 beta 1 app on R2, with similar results. It took me quite a while to discover that the problem was that one of the core .net assemblies referenced in the project (from the GAC) had become marked as CopyLocal true. I've no idea how - I certainly didn't do it deliberately and no-one else worked on that one. Once I set that back (and, I think I had to delete the local copy) all was well.


I found the answer for my problem with CppCodeProvider here: http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_2.0/Q_24367712.html (login is required)

Turn off "Define TRACE Constant" or else install the .NET SDK on the computer with the problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜