Compilation error CS0016: Could not write to output file

后端 未结 4 642
攒了一身酷
攒了一身酷 2020-12-06 16:45

In Brief

When I attempt to browse my website, I get the following error message:

CS0016: Could not write to output file \'c:\

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 17:15

    The answer was found using ProcMon:

    http://technet.microsoft.com/en-us/sysinternals/bb896645

    The temporary asp.net files are first created in the user's temp folder and then moved into this folder. For some as yet unknown reason, the compilation for my Web2 site (.NET 2 AppPool) now uses the same folders as my Web4 (.NET 4 AppPool) site.

    I used ProcMon to identify all results for "access denied" and gave the IIS_IUSRS group write permissions (and in one case - C:\Users\ASP.NET V4.0 Integrated - modify permissions).

    I have no idea why the compilation is using the "wrong" folders and I suspect I may have over-elevated the permissions in some cases, but for now it's working.

提交回复
热议问题