You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

发布Core 2.0至IIS时出现HTTP Error 500.19错误求助

Fixing HTTP Error 500.19 When Publishing ASP.NET Core 2.0 MVC to IIS 7.5 Express (Windows 8.1)

Hey Diego, sorry to hear you're stuck on this frustrating error—especially since your regular MVC Framework projects run without a hitch. This issue is almost always tied to ASP.NET Core-specific IIS setup gaps, so let's walk through the most reliable fixes step by step:

1. Install the ASP.NET Core Hosting Bundle

ASP.NET Core relies on a special IIS module that isn't pre-installed on Windows 8.1. Here's how to get it:

  • Open Visual Studio 2017's Installer, select Modify for your active workload, and make sure the ASP.NET and Web Development workload includes the ASP.NET Core Runtime component.
  • Alternatively, grab the official ASP.NET Core 2.0 Hosting Bundle installer (it includes both the Core runtime and the required IIS module) and run it on your machine.

2. Correct IIS Express Application Pool Settings

Core projects can't run in IIS's classic pipeline mode, and they don't depend on the .NET Framework CLR. Let's verify your pool config:

  • Open the IIS Express configuration file at %USERPROFILE%\Documents\IISExpress\config\applicationhost.config
  • Search for your published Core site's <site> entry, then check its associated <applicationPool>:
    • Ensure managedPipelineMode="Integrated" (not Classic)
    • Set managedRuntimeVersion=""—this tells IIS to use "No Managed Code" mode, which is mandatory for Core projects.

3. Validate the Published web.config

Your published project's web.config must have the correct aspNetCore section to launch the Core runtime. Double-check that it includes this block:

<system.webServer>
  <aspNetCore processPath="dotnet" arguments=".\YourProjectName.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
  • Confirm the arguments path matches your actual project DLL name exactly
  • If this section is missing, re-publish the project from Visual Studio and double-check your "Publish to IIS" settings.

4. Check Folder Permissions

IIS Express needs proper access to your published project folder:

  • Right-click the published folder > Properties > Security tab
  • Add the IIS_IUSRS group (or the user account your IIS Express pool runs under) and grant it Read & Execute, List Folder Contents, and Read permissions.
  • If you enable stdout logging later, also grant Write access to the logs subfolder.

5. Enable Detailed Logging for Debugging

If the above steps don't resolve the error, turn on stdout logging to get precise, actionable details:

  • Edit your web.config and set stdoutLogEnabled="true"
  • Restart the IIS Express site
  • Check the logs folder in your published directory—this will contain runtime logs that can pinpoint issues like missing dependencies, invalid file paths, or permission failures.

Give these steps a shot, and let me know if any of them get your Core 2.0 MVC project running smoothly!

内容的提问来源于stack exchange,提问作者Diego

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:35:24