title: Access denied on Microsoft.SharePoint.ApplicationPages
body: <p>On our MOSS Enterprise environment, we have a strange problem. From time to time, people get this error message when they try to create a new site collection or navigate to their mysite:</p>
  
  <blockquote>
    <p>‘Could not load file or assembly
    'Microsoft.SharePoint.ApplicationPages,
    Version=12.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c' or
    one of its dependencies. Access is
    denied.’</p>
  </blockquote>
  
  <p>The problem is fixed by updating the security of directory c:\inetpub\wwwroot\wss\virtualdirectories\[central admin folder]\ (for creating site collections) or c:\inetpub\wwwroot\wss\virtualdirectories\[mysite folder]\.</p>
  
  <p>After a couple of hours or days, the problem returns and we have to update the security again. Has anyone else seen this behavior before ?</p>
  
  <p>UPDATE (28/4/2011):</p>
  
  <p>Well... what I've noticed is that this happens after the application pool has timed out... mostly at night when SharePoint is not being used. I've also noticed that the problem disappears by opening the web.config file, adding a space and saving it (I guess this recycles the application pool).</p>
  
  <p>As a workaround I simulate a page request to a page in each web application every 15 minutes and it works (it keeps the application pool alive). It's not a real solution, but at least the users are helped.</p>
  
  <p>We had a case with MS for this problem but didn't find an answer. Because we are planning an upgrade to 2010, we stopped investing time in this issue and apply the mentionned workaround until the 2007 environment is phased out.</p>