How to Manipulate Application Pool Configurations in an MVC Application

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 08:19:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!