Who has not encounterd this problem: you’re just doing some debugging on your favorite SharePoint application and all over sudden – bam! The application pool gets recycled.
Well, the problem is the timeout associated with each application pool. When IIS detects that an application pool is not responding anymore IIS just assumes something terrible happend and recycles the application pool. But all that really happend is some plain-old-debugging.
In order to circumvent this problem you have to disable the pinging of application pools by IIS. Just open up the advanced settings of the IIS application pool and set pinging to false.
Up to Windows 2008 there was a nifty little VB-Script called
iisapp.vbs. This allowed to just restart the application pool without having to restart the whole IIS. For one this is much faster and also this doesn’t effect other application pool. Thus you can restart a single application.
But with Windows 2008 this script is no longer provided. But fortunatly there is a new kid in town:
appcmd.exe. This tool can be found in
To restart (recylce) an application pool you just call:
c:\Windows\System32\inetsrv\appcmd recycle apppool "SharePoint - 80"
Starting with IIS 7.5 (Windows 7, Windows 2008 R2) application pools can be started with the help of an IIS module. This module issues web-requests whenever a new worker-process is being started. This eliminitates the need for additional warmup-scripts.
A more detailed describtion on how to use this module can be found at Using the IIS Application Warm-Up Module.
I just stumpled across the offical Microsoft IIS Site, which I didn’t actually knew so far. This is a great resource for IIS, especially if your looking for security or performance related addons for IIS.
I just run into an odd problem. For testing purpose I wanted to run a ASP.Net application with some privileged account. So just for the heck I created a new app-pool in IIS and assigned this pool to my app. Then I set the identity of the app pool to my own domain-account – this should definitely work, since I’m a local administrator on this dev-machine – who if not the admin should run an app?
But the eventlog stated something strange: the identity of my newly created app pool is invalid! And accessing the app kinda proves this: the app pool is being deactivated in IIS.
But now to the rescue: the identity setup in the app-pool must be a member of the local