title: Access denied to Temp ASP.NET directory
body: <p>Please review my UnauthorizedAccessException ASP.NET error.</p>
  
  <pre><code>Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\8909a2b1\8566823\Nop.Plugin.Feed.Froogle.dll' is denied.
  </code></pre>
  
  <p>The error has occured since I changed the website to be hosted through VS 2010 IIS from my machines IIS. My solution has previously worked in VS 2010 IIS as I went from VS IIS to Machine IIS back to VS ISS.</p>
  
  <p>My Problem occurs when I copy dlls to the temp directory.</p>
  
  <pre><code>File.Copy(...
  </code></pre>
  
  <p>I've tested the various permissions on the directory and nothing helped. i also ran the aspnet_regiis -i command in the hope it would restore the desired permissions on the temp directory.</p>
  
  <p>I dont have any problems if I delete the '../Temporary ASP.NET Directory', it only occurs when I try to replace existing files.</p>
  
  <pre><code>File.Copy("source", "c:\windows\microsoft.net\framework\v4\temporary asp.net files\...\###.dll", true);
  </code></pre>
  
  <p>Any help would be appreciated. Thanks,</p>