如何在MVC应用程序中操作应用程序池配置 [英] How to Manipulate Application Pool Configurations in an MVC Application
问题描述
有问题的配置可在此处找到。举个例子。我想将startMode配置属性设置为AlwaysRunning,但不确定在何处或如何完成此MVC应用程序。是否可以从Web.Config文件中设置这些配置?如果是,怎么做?
The configurations in question are found here. As an example. I would like to set the "startMode" configuration attribute to "AlwaysRunning" but not sure where or how to accomplish this an MVC application. Is it possible to set those configurations from the Web.Config file? And if yes, how?
推荐答案
我认为你不能从你的web.config中设置它,它应该在服务器上完成side的applicationHost.config,执行如下操作:
在windows / system32 / inetsrv / config中找到applicationHost.config;找到并找到您的应用程序池并添加以下属性:startMode =AlwaysRunningEx:
I think you cannot set this from your web.config, and it should be done in server side's applicationHost.config, for doing it do as below: find applicationHost.config in windows/system32/inetsrv/config; locate and find your application pool and add this attribute: startMode="AlwaysRunning" Ex:
<add name="AppPool1" autoStart="true" startMode="AlwaysRunning" />
这篇关于如何在MVC应用程序中操作应用程序池配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!