{"id":22003,"date":"2013-10-09T13:45:06","date_gmt":"2013-10-09T20:45:06","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/aspnet\/?p=22003"},"modified":"2013-10-09T13:45:06","modified_gmt":"2013-10-09T20:45:06","slug":"enable-and-monitor-asp-net-app-suspend-on-windows-server-2012-r2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/enable-and-monitor-asp-net-app-suspend-on-windows-server-2012-r2\/","title":{"rendered":"Enable and monitor ASP.NET App Suspend on Windows Server 2012 R2"},"content":{"rendered":"<blockquote>\n<p><em>This post describes how to enable and monitor ASP.NET App Suspend on Windows Server 2012 R2. It was written by Rich Lander, a Program Manager on the .NET team.<\/em><\/p>\n<\/blockquote>\n<p>ASP.NET App Suspend is a big new feature in the .NET Framework 4.5.1. You can read an <a href=\"http:\/\/blogs.msdn.com\/b\/dotnet\/archive\/2013\/10\/09\/asp-net-app-suspend-responsive-shared-net-web-hosting.aspx\">overview of ASP.NET App Suspend<\/a> (including a demonstration video) over on the <a href=\"http:\/\/blogs.msdn.com\/b\/dotnet\">.NET blog<\/a>. ASP.NET App Suspend is a great feature for shared hosters and Enterprise IT. It enables apps to startup much faster and for each server to host many more apps. In our performance lab, we saw startup time drop by 90% and were able to pack 7 times more sites onto the same machine, when App Suspend was enabled. That\u2019s a unique and welcome combination.<\/p>\n<p>App Suspend is a new hosting configuration in Internet Information Services (IIS) in Windows Server 2012 R2. The only requirement is that your app is running on the .NET Framework 4.5.1, which comes with Windows Server 2012 R2. No code changes are required. It\u2019s literally as simple as the flip of a switch. Let\u2019s take a look at that switch.<\/p>\n<h2>How to enable ASP.NET App Suspend<\/h2>\n<p>Enabling ASP.NET App suspend is pretty easy, in Internet Information Services Manager. As I wrote earlier, this setting is set on an app pool basis. Here\u2019s what you need to do.<\/p>\n<ul>\n<li>Open the IIS Manager<\/li>\n<li>Right-click on an app pool \u2013 you\u2019ll see the context menu<\/li>\n<li>Select \u201cAdvanced Settings \u2026\u201d<\/li>\n<\/ul>\n<p><img decoding=\"async\" title=\"clip_image003\" style=\"border: 0px currentcolor;margin-right: auto;margin-left: auto;float: none;background-image: none\" border=\"0\" alt=\"clip_image003\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/metablogapi\/1856.clip_image003_3988DE67.jpg\" width=\"624\" height=\"431\" \/><\/p>\n<p>You will see the Advanced Settings dialog. The \u201cIdle Time-out\u201d settings are the important ones to look at for this scenario, particularly the \u201cIdle Time-out Action\u201d. The default for that setting is terminate.<\/p>\n<p><img decoding=\"async\" title=\"clip_image004\" style=\"border: 0px currentcolor;margin-right: auto;margin-left: auto;float: none;background-image: none\" border=\"0\" alt=\"clip_image004\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/metablogapi\/4503.clip_image004_7952C4EC.png\" width=\"594\" height=\"576\" \/><\/p>\n<p>Change the \u201cIdle Time-out Action\u201d to Suspend, as you see below. Your app pool is now configured for ASP.NET App Suspend.<\/p>\n<p><img decoding=\"async\" title=\"clip_image005\" style=\"border: 0px currentcolor;margin-right: auto;margin-left: auto;float: none;background-image: none\" border=\"0\" alt=\"clip_image005\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/metablogapi\/2450.clip_image005_07250AE8.png\" width=\"452\" height=\"183\" \/><\/p>\n<p>You will probably want to test out this feature. You could wait the entire 20 minutes, however, I suggest that you temporarily set the time-out to 1 minute, for testing purposes. Do remember to switch it back.<\/p>\n<h2>Monitoring site suspension<\/h2>\n<p>You can validate that an app was suspended in the event viewer, in the Application event log. Search for event 2310. You can see an example event, below. <img decoding=\"async\" title=\"clip_image007\" style=\"border: 0px currentcolor;margin-right: auto;margin-left: auto;float: none;background-image: none\" border=\"0\" alt=\"clip_image007\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/metablogapi\/5670.clip_image007_391CAB72.jpg\" width=\"624\" height=\"358\" \/><\/p>\n<h2>Summary<\/h2>\n<p>ASP.NET App Suspend is a very significant change to the way ASP.NET apps are hosted in IIS. It comes with a big benefit to app startup and hosting density. We\u2019ve tested it extensively in our performance labs and have been consistently impressed with how it performs. Please try it out and tell us how it works for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post describes how to enable and monitor ASP.NET App Suspend on Windows Server 2012 R2. It was written by Rich Lander, a Program Manager on the .NET team. ASP.NET App Suspend is a big new feature in the .NET Framework 4.5.1. You can read an overview of ASP.NET App Suspend (including a demonstration video) [&hellip;]<\/p>\n","protected":false},"author":404,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[4,31,34,7436,7432],"class_list":["post-22003","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-net","tag-asp-net","tag-asp-net-web-api","tag-visual-studio-2013","tag-webapi"],"acf":[],"blog_post_summary":"<p>This post describes how to enable and monitor ASP.NET App Suspend on Windows Server 2012 R2. It was written by Rich Lander, a Program Manager on the .NET team. ASP.NET App Suspend is a big new feature in the .NET Framework 4.5.1. You can read an overview of ASP.NET App Suspend (including a demonstration video) [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/22003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/404"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=22003"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/22003\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=22003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=22003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=22003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}