Mike Volodarsky's blog

Formerly the core server PM for IIS 7.0 and ASP.NET, now I run LeanSentry.
UPDATES: New troubleshooting guide released! Fix IIS website hangs →

Configure IIS websites on Windows Azure with startup tasks and AppCmd

At LeanSentry, we use Windows Azure heavily to scale out our extensive data collection and diagnostic data processing.   Just like anyone else, we have our fair share of difficulties with deploying and configuring our web roles, esp. when it comes to more advanced configuration.  As a result, we often rely on startup tasks to configure IIS and other windows server components to do stuff we need.

Here are some tips and a tool we use to make these tasks much easier.  Read More...

Caution when stopping and starting an IIS application pool with appcmd

When starting and stopping IIS 7 application pools from command line with appcmd.exe, you should be aware of a behavior that can sometimes lead to unintended circumstances.

To explain it, lets first review what happens when you stop an application pool with the InetMgr.exe tool:

1) Set the autoStart property of the <applicationPool> configuration element to false.  This causes WAS to not start any worker processes when a new request to an application mapped to the application pool arrives.

2) Call IIS RSCA (runtime status and control API) to stop the application pool, which instructs all w3wp.exe processes in that application pool to shut down (gracefully at first, then killed if they exceed the shutdownTimeLimit).  WAS will remember that the apppool is stopped while it is loaded, and any subsequent requests to the apppool will return a 503.

These are two logical actions - #2 being a transient action to terminate the apppool's current processes, and #1 being a persistent directive not to start the apppool.