如何在 MVC 应用程序中操作应用程序池配置

How to Manipulate Application Pool Configurations in an MVC Application

已找到相关配置 here。举个例子。我想将 "startMode" 配置属性设置为 "AlwaysRunning" 但不确定在何处或如何完成此 MVC 应用程序。是否可以从 Web.Config 文件中设置这些配置?如果是,怎么做?

我认为你不能从你的 web.config 中设置它,它应该在服务器端的 applicationHost.config 中完成,具体操作如下: 在 windows/system32/inetsrv/config 中找到 applicationHost.config;找到并找到您的应用程序池并添加此属性:startMode="AlwaysRunning" 例如:

<add name="AppPool1" autoStart="true" startMode="AlwaysRunning" />