HTTP Error 500.30 - ASP.NET Core app failed to start

IIS部署后环境部署没问题报错

问题描述:

  HTTP Error 500.30 - ASP.NET Core app failed to start

  Common solutions to this issue:

  •The app failed to start

  •The app started but then stopped

  •The app started but threw an exception during startup

  Troubleshooting steps:

  • Check the system event log for error messages

  • Enable logging the application process' stdout messages

  • Attach a debugger to the application process and inspect

  For more guidance on diagnosing and handling these errors, visit Troubleshoot ASP.NET Core on Azure App Service and IIS.

解决办法:

   给 TEMP 目录添加权限

  1. 打开 C:\Windows\TEMP 文件夹。

  2. 右键 → 属性 → 安全 → 编辑。

  3. 添加用户 IIS AppPool\你的应用程序池名称(例如 IIS AppPool\DefaultAppPool)。

  4. 赋予 完全控制 或 写入 权限。

  5. 点击确定,并重启网站。

错误原因:

你的.NET Core程序在处理请求(特别是序列化JSON返回给前端)时,因为响应体可能比较大,或者触发了缓冲机制,试图在C:\Windows\TEMP目录下创建一个临时文件(ASPNETCORE_xxx.tmp)来缓存数据。

百分之99能立即解决问题,这是windows server 上部署IIS+.NET Core最金典的“坑”之一

posted @ 2026-01-27 12:48  千万少女的梦  阅读(36)  评论(0)    收藏  举报