在IIS上的asp net核心2.0托pipe返回空白页面,错误500

我正在尝试将ASP NET Core 2.0完整框架应用程序解压到Windows Server 2012 R2中的IIS,并保持失败。 该应用程序在VS2017本地运行良好,也可以在我手动运行EXE并连接到localhost:5000上的kestrel服务器时在服务器上运行。 但是,尝试在IIS中进行托pipe会导致IIS发生错误500。

我已经按照https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x上的说明,但我没有看到任何提及设置为aspnetworking核心2满框架(而不是networking核心)。 该应用程序使用EF6,因此它的目标是完整的.NET Framework 461.安装.NET Core Windows Server主机软件包,然后重新启动服务器。 还有其他标准的asp.net网站在服务器上运行。 aspnetworking核心iis网站是根据指令configuration应用程序池设置为“无托pipe代码”。

web.config是

<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /> </handlers> <aspNetCore processPath=".\appng.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" /> <httpErrors errorMode="Detailed" /> </system.webServer> </configuration> <!--ProjectGuid: c458df4b-f145-427d-9bfb-5959b2a0932b--> 

启用web.config中的stdout日志logging显示以下错误:

 Hosting environment: Production Content root path: C:\inetpub\appng Now listening on: http://localhost:17402 Application started. Press Ctrl+C to shut down. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HL7V7O2GO450", Request id "0HL7V7O2GO450:00000001": An unhandled exception was thrown by the application. System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section runtime. (C:\inetpub\appng\appng.exe.Config line 3) 

appng.exe.config的内容是:

 <?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Runtime.Serialization.Xml" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" /> </dependentAssembly> </assemblyBinding> ... [lots more assemblybindings] </runtime> </configuration> 

这是我试图寻找任何有关的错误,但根本找不到任何东西。

任何帮助将不胜感激。