在IIS7.5的64位Windows上运行x86 Asp.net应用程序的问题
我目前正在准备一台运行我们的ASP.Net平台的新服务器。我第一次在64位Windows(2008 R2)上进行安装,并在IIS7.5上进行安装(在此之前总是7.0)。我们的网站是用x86构建的,所以我已经启用了应用程序池来使用32位应用程序。在IIS7.5的64位Windows上运行x86 Asp.net应用程序的问题
我被困在下面的错误,我得到的,当我浏览网站:
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
我用fuslogvw追查任何.NET绑定错误:4个组件出现了,但我得到我们的常规服务器上第一次浏览该网站时也是如此。程序集是CppCodeProvider,VJSharpCodeProvider和我们的两个* .resources文件。我研究过这些,我不认为它们是造成这个问题的原因,当然在找到工作环境后fuslogvw中缺少相同的程序集。
接下来我用Dependency Walker来研究网站的主DLL。似乎什么都不缺,但我得到了以下信息:
* Error: Modules with different CPU types were found.
我不认为这是一个问题,也是因为我的.NET程序集是x86和其他所有依赖是64位。
所以我真的很想知道什么缺少“模块”ASP.Net抱怨。
这解决了我的问题:我必须将msvcr71.dll放在c:\ windows \ system32和c:\ windows \ syswow64中。
很高兴你钉上了它。不要忘记将此标记为帮助他人的答案。 是什么让你看到那个? – serialhobbyist 2009-11-05 20:49:39
一位同事记得他必须在旧设备上做同样的事情。不知道他是如何发现这一点的,但我尝试了它,并发挥了作用! – 2009-11-06 07:53:08
尝试过并且不适合我。:( – 2014-05-24 11:56:01
在R2上放置4.0 beta 1应用程序时,最近有类似的问题,结果相似。我花了很长时间才发现问题是项目中引用的核心.net程序集(来自GAC)已被标记为CopyLocal true。我不知道如何 - 我当然没有故意去做,也没有其他人在做这件事。一旦我设置了它(并且,我认为我必须删除本地副本),一切都很好。
我会检查出来,谢谢+1 – 2009-11-05 10:39:56
我已经检查了这个,这可能不是这种情况... 所有System。*程序集来自GAC,我已经用fuslogvw检查了每一个绑定。 – 2009-11-05 12:00:18
我找到了答案我的问题与CppCodeProvider这里: http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_2.0/Q_24367712.html (需要登录)
关闭“定义TRACE常数”,否则计算机的问题上安装.NET SDK。
我解决了设置问题启用到真下的应用程序池的高级设置选项卡中的32位程序。
Enable 32 bit program http://zizhujy.com/blog/image.axd?picture=Enable32Bit.png
谢谢!这解决了我的问题。 – 2015-04-24 21:56:35
可能有人与编辑权限给了这个问题一个更好的标题?像“ASP.NET应用程序中的CppCodeProvider和VJSharpCodeProvider绑定错误” – mhenry1384 2010-01-04 22:41:40