If you attempt to run an ASP.NET application hosted on IIS7.0 running on Windows Home Basic or Premium (Vista or Windows 7, x86 or x64), you may receive the following error:
error CS0016: Could not write to output file
The problem occurs because Windows Home Basic and Premium lack Windows Authentication. You can solve this problem with a few mouse clicks:
1. Run the Internet Information Services (IIS) Manager program. It can be found in the Start > Administrative Tools menu. You may have to edit the Start Menu properties to show the Administrative Tools folder.
2. Select the Application Pools item in the Connections pane.
3. Right-click on the application pool in which you are running your ASP.NET application. On my PC, this was the DefaultAppPool.
4. Select Advanced Settings from the popup menu.
5. In the Process Model section, set the Identity to LocalSystem. Click the OK button.