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 ?
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:
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.
Member
85 Points
299 Posts
Deploying Applicationhost.config to live server
Feb 13, 2017 08:22 AM|SANJISH KUMAR|LINK
Hi,
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 ?
Please help
regards
Sanjish
All-Star
17652 Points
3510 Posts
Re: Deploying Applicationhost.config to live server
Feb 14, 2017 05:58 AM|Chris Zhao|LINK
HI Sanjish,
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:
You could also set in the Application Pool Settings UI.
reference:
https://www.simple-talk.com/blogs/speeding-up-your-application-with-the-iis-auto-start-feature/
https://weblogs.asp.net/scottgu/auto-start-asp-net-applications-vs-2010-and-net-4-0-series
Best Regards,
Chris
Member
85 Points
299 Posts
Re: Deploying Applicationhost.config to live server
Feb 14, 2017 06:19 AM|SANJISH KUMAR|LINK
Hi,
Thanks for the solution Chris. Could I just load this file on the root of my site along with web.config ?
Regards
Sanjish
All-Star
194511 Points
28081 Posts
Moderator
Re: Deploying Applicationhost.config to live server
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.