title: IIS: Web Application hangs periodically needs system reboot
body: <p>Once every 18-24 hours my IIS stops responding on a particular website. We have upgraded our web application a week ago and this seems to have started it. When it happens:</p>
  
  <ol>
  <li>Any request to the asp.net application hangs for ever</li>
  <li>Restarting the application pool gives the error <strong>0x80070425</strong> (The service cannot accept control message at this time)</li>
  <li>I cannot even log off from the computer, Log Off hangs. The only way is to restart the machine</li>
  <li>Sometimes it gets triggered with some unhandled ado.net exception, at other times there is no pattern.</li>
  <li>Inspection of the IIS log files does not product any recognizable pattern</li>
  </ol>
  
  <p>Machine is <strong>windows server 2008 R2 Standard Edition</strong>. My application runs with <strong>ASP.Net 4.0 Classic Mode</strong></p>
  
  <p>Some of the event log entries found are the following:</p>
  
  <hr>
  
  <p>There was an error during processing of the managed application service auto-start for application pool: 'MyApps'.  The loading of application service provider objects is not supported if the pipeline mode is set to 'Classic' mode.  As a result, no managed application service auto-start has been completed.  To resolve this issue, please change the pipeline mode for this application pool to 'Integrated' mode.  The data field contains the error code.</p>
  
  <hr>
  
  <p>A worker process '1164' serving application pool 'MyApps' failed to stop a listener channel for protocol 'http' in the allotted time.  The data field contains the error number.</p>
  
  <hr>
  
  <p>Application pool OfficeClip has been disabled. The request from protocol http to create the application pool failed. Restart the application pool so that Windows Process Activation Service (WAS) can determine the correct state of the protocol. The data field contains the error number.</p>
  
  <hr>
  
  <p>Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.  </p>
  
  <p>DETAIL - 
   1 user registry handles leaked from \Registry\User\S-1-5-21-3692684334-282388892-2276244761-500:
  Process 900 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-3692684334-282388892-2276244761-500\Printers\DevModePerUser</p>
  
  <hr>
  
  <p>The World Wide Web Publishing Service failed to set the application pool for the application '/' in site '10'. The data field contains the error number.</p>
  
  <hr>
  
  <p><em>Any ideas on how to figure out what is wrong short of reinstalling the OS?</em></p>