CS0016: Could not write to output file 'c:\..\..\App_Web_XXXX.aspx..dll' -- 'The directory name is invalid. '
<p>This problem is driving me nuts.</p>

<blockquote>
  <p>CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework&lt;64>\vX.X.XXXX\Temporary ASP.NET Files\root\XXXXXX\XXXXXX\App_Web_XXXX.aspx.XXXXXXXX.XXXXXXXX.dll' -- 'The directory name is invalid. '</p>
</blockquote>

<p>I've tried to give full access to the network service on C:\windows\temp and the temp folder in v4.0.xxx folder.</p>

<p>The server is Windows Server 2008 R2; SQL Server 2008 R2 is installed on the same server.</p>

<p>I believe that it could have something to do with SQL Server being installed after the .NET Framework 4.0 was installed, but I ran <code>aspnet_regiis.exe -u</code> and then <code>-i</code> to reinstall. I've tried from both the Framework folder and Framework64 folder but to no avail.</p>

<p>Has anyone else had this problem? If so, how did you fix it?</p>
