原来运行正常的站点,突然不正常了,出现503错误。查看操作系统的日志查看器显示:
由于配置问题,无法加载模块 DLL“C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll”。当前配置仅支持加载为 x86 处理器架构构建的映像。数据字段包含错误号。要了解有关此问题的更多信息,包括如何解决这类处理器架构不匹配错误,请参见 http://go.microsoft.com/fwlink/?LinkId=29349。

从这里基本就可以看出来是站点配置文件的问题了,先查站点下的web.config里,看下有没有"aspnetcorev2"的字样,如果没有,就继续往跟上找,做asp.net开发的都知道iis的配置,是逐层继承合并的,于是找到了:

打开这个文件再搜索,你会发现以下内容:

一共修改以下几个内容,我摘要出来:
<add name="AspNetCoreModule" image="%SystemRoot%\system32\inetsrv\aspnetcore.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
<add name="AspNetCoreModuleV2" image="%ProgramFiles%\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
</globalModules>
<system.webServer>
<modules>
<add name="AspNetCoreModule" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
<add name="AspNetCoreModuleV2" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
</modules>
IIS应用程序池"启用32位"导致服务不可用的503错误
原文:https://www.cnblogs.com/yulinlover/p/10366668.html