title: How are HTTP requests dispatched to an Azure web role instance while the instance is restarting due to an exception?
body: <p>I'm reviewing my Azure web role logs and see the following. At some moment in the past the thread that was having <code>RoleEntryPoint.Run()</code> invoked on it threw an exception that was propagated to the caller of <code>Run()</code> and the Azure runtime tried to restart the instance by calling <code>RoleEntryPoint.OnStart()</code>. Now my <code>OnStart()</code> implementation takes several minutes to complete and I see that HTTP requests were being dispatched to IIS while <code>OnStart()</code> was in progress.</p>
  
  <p>Is that the expected behavior? Shouldn't the Azure infrastructure wait till the instance <code>OnStart()</code> completes successfully? How do I make Azure exclude the role from dispatching HTTP requests onto it until <code>OnStart()</code> completes successfully?</p>