简体   繁体   English

使用IIS7.5在64位Windows上运行x86 Asp.net应用程序的问题

[英]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. 我目前正在准备一台新服务器来运行我们的ASP.Net平台。 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). 我第一次在64位Windows(2008 R2)和IIS7.5(之前总是7.0)上进行安装。 Our website is built in x86, so I've enabled the application pools to use 32-bit applications. 我们的网站是用x86构建的,所以我已经启用了应用程序池来使用32位应用程序。

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.BuildProvidersCompiler..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. 我已经使用fuslogvw来追踪任何.Net绑定错误:4个程序集出现了,但是我第一次浏览网站时在常规服务器上得到了相同的4个。 The assemblies are CppCodeProvider, VJSharpCodeProvider and two of our *.resources files. 程序集是CppCodeProvider,VJSharpCodeProvider和我们的两个* .resources文件。 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. 我已经研究了这些问题,我认为它们不是导致这个问题的原因,当然在找到工作环境后fuslogvw中缺少相同的程序集时也是如此。

Next up I used Dependency Walker to study the website's main DLL. 接下来,我使用Dependency Walker来研究网站的主要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. 我不认为这是一个问题,因为我的.Net程序集是x86,所有其他依赖项都是x64。

So I really want to know what missing "module" ASP.Net is complaining about. 所以我真的想知道ASP.Net抱怨的“模块”缺失了什么。

这解决了我的问题:我必须将msvcr71.dll放在c:\\ windows \\ system32和c:\\ windows \\ syswow64中。

I solved the problem by setting Enable 32 bit program to True under advanced setting tab of App Pool. 我通过在App Pool的高级设置选项卡下将Enable 32 bit program设置为True来解决了这个问题。

启用32位程序
(source: zizhujy.com ) (来源: 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. 我最近在R2上安装了4.0 beta 1应用程序时遇到了类似的问题,结果相似。 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. 我花了很长时间才发现问题是项目中引用的核心.net程序集之一(来自GAC)已被标记为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) 我在这里找到了解决CppCodeProvider问题的答案: http//www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_2.0/Q_24367712.html (需要登录)

Turn off "Define TRACE Constant" or else install the .NET SDK on the computer with the problem. 关闭“定义TRACE常量”或者在出现此问题的计算机上安装.NET SDK。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ASP.NET / MVC 4在64位IIS 7.5服务器上捆绑和缩小404问题 - ASP.NET / MVC 4 bundling and minification 404 issues on 64-bit IIS 7.5 server 重新编译在64位Windows Server 2003上运行的iis6 32位asp.net 3.5 - Recompiles iis6 32-bit asp.net 3.5 running on 64-bit Windows Server 2003 将ASP.NET 3.5 / IIS6应用程序升级到ASP.NET 4.0 / IIS7.5 - Upgrade asp.net 3.5/IIS6 application to asp.net 4.0/IIS7.5 IIS 7.5 asp.net应用程序未运行 - IIS 7.5 asp.net application not running 带有 IIS7.5 和 ASP.NET v2 的 Web 应用程序问题(web.config 错误)HTTP 500.19 - Web Application Problems (web.config errors) HTTP 500.19 with IIS7.5 and ASP.NET v2 在64位IIS服务器上配置32位ASP.NET应用程序 - Configuring 32-Bit ASP.NET Application on a 64-Bit IIS Server ASP.NET运行时错误:“path”不是有效的IIS应用程序。 VS2012 / IIS7.5 - ASP.NET runtime error: “path” is not a valid IIS application. VS2012 / IIS7.5 配置ASP.NET以在x64 Windows上使用x86 - Configure ASP.NET to use x86 on x64 Windows 在ASP.NET应用程序的生产环境中将x86更改为x64 dll - Change x86 to x64 dlls in production environment for ASP.NET application asp.net Web应用程序编译并部署在x64与x86上 - asp.net web application compile and deployed on x64 vs x86
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM