Last post Feb 14, 2017 07:37 AM by Mikesdotnetting
Feb 13, 2017 08:22 AM|SANJISH KUMAR|LINK
I need to create an autostart asp.net 4.5 application . i have read that i can change the applicationhost.config with startmode="alwaysrunning" to achieve this. Where can i find this file on my windows 7 computer and after having made the changes
how do i deploy it to the server ? Can i copy it to the root of the website along with web.config ? When will this file get activated ?
Feb 14, 2017 05:58 AM|Chris Zhao|LINK
You can do this by opening up the IIS applicationHost.config file (C:\Windows\System32\inetsrv\config\applicationHost.config) and by adding a startMode="AlwaysRunning" attribute to the appropriate <applicationPools> entry:
<add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" />
You could also set in the Application Pool Settings UI.
Feb 14, 2017 06:19 AM|SANJISH KUMAR|LINK
Thanks for the solution Chris. Could I just load this file on the root of my site along with web.config ?
Feb 14, 2017 07:37 AM|Mikesdotnetting|LINK
The file is expected to be found in the %windir%\system32\inetsrv\config directory. It is the root config file for IIS. If you have a shared hosting account, you will not have access to this location. If you have access to this location, presumably
you also have access to IIS Manager so you can configure your site settings in there.