问题
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?
回答1:
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" />
来源:https://stackoverflow.com/questions/35046455/how-to-manipulate-application-pool-configurations-in-an-mvc-application