在 asp .net core 3 中使用进程内托管设置请求超时

use*_*816 8 c# asp.net asp.net-core

我有一个 asp .net 核心网站,在 web.config 中有以下内容

<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" arguments="%LAUNCHER_ARGS%" requestTimeout="00:20:00">
Run Code Online (Sandbox Code Playgroud)

但是它超时了错误

HTTP Error 500.37 - ANCM Failed to Start Within Startup Time Limit
Run Code Online (Sandbox Code Playgroud)

我可以从https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.0看到requestTimeout 属性不适用于 in-进程托管。有没有增加超时的替代方法?

另一种前进的方法是重新调整应用程序,以便在第一次点击时加载不会花费很长时间,但现在我试图避免这种情况。

小智 0

我遇到了同样的问题,在花了一些时间寻找根本原因和可能的解决方案后,我了解到当同一台计算机上有许多应用程序池时会发生这种情况,这就是我的情况。

\n

Microsoft 建议错开多个应用程序的启动过程。另一个解决方案是增加启动限制

\n

我见过一些人谈论将 hostProcess 从Inbound更改为Outbound,这可能有效,但 IS HTTP Server 不会使用\xe2\x80\x99,但Kestrel Web 服务器用于处理请求。

\n

我认为最好的解决方案是错开启动过程或者增加启动限制。

\n

您可以在这里找到更多信息:\n https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.0

\n

https://tutorialshelper.com/what-is-the-difference- Between-inprocess-and-outofprocess-service-in-asp-net-core/

\n