CS0016: Could not write to output file ‘c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files… ‘Access is denied.’
Do you face this problem lately? I did. I have problem to run ASP.NET web application on a fresh installed server. It cannot run ASP.NET even I install .NET Framework 3.5. Web application can be loaded after I register ASP.NET into IIS by using “aspnet_regiis.exe -i -enable“.

However, I faced the problem statement above. So what is the solution? It have something to do with file permission. Just follow below steps to fix it.
Grant full control to two users of your system “Network Service” and “YourComputerName\IIS_IUSERS” on the following folders.
1. C:\Windows\Temp
2. C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
Restart IIS and try run your web application again.

Hope this guide will help.

Category: asp.net
Bookmark and Share

Comment and make your thoughts visible

blog comments powered by Disqus