Enable and monitor ASP.NET App Suspend on Windows Server 2012 R2

Enable and monitor ASP.NET App Suspend on Windows Server 2012 R2

Rate This
  • Comments 2

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) over on the .NET blog. 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’s a unique and welcome combination.

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’s literally as simple as the flip of a switch. Let’s take a look at that switch.

How to enable ASP.NET App Suspend

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’s what you need to do.

  • Open the IIS Manager
  • Right-click on an app pool – you’ll see the context menu
  • Select “Advanced Settings …”

clip_image003

You will see the Advanced Settings dialog. The “Idle Time-out” settings are the important ones to look at for this scenario, particularly the “Idle Time-out Action”. The default for that setting is terminate.

clip_image004

Change the “Idle Time-out Action” to Suspend, as you see below. Your app pool is now configured for ASP.NET App Suspend.

clip_image005

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.

Monitoring site suspension

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. clip_image007

Summary

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’ve 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.

Leave a Comment
  • Please add 7 and 3 and type the answer here:
  • Post
  • hi, is there any way to make ASP.NET App Suspend work on Windows Server 2008?

  • @Luiz -- ASP.NET App Suspend is the .NET implementation of a Windows Server 2012 R2 feature. As a result, it isn't possible to support that implementation, since the underlying OS features do not exist on Server 2008.

    You can think of .NET 4.5.1 "lighting up" on Windows Server 2012 R2. The only way to get this feature is to upgrade your server, or move your app to Windows Azure (which supports Windows Server 2012 R2).

Page 1 of 1 (2 items)