Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
Solution to an annoying error message! You are getting 'Could not write to output file 'c:\Windows\Microsoft.NET\Framework\....' message? You are at the right place.
3/5/2011 10:18:00 AM
15 comments
24143 times
This week I went nuts over my local IIS. I have never swore to a machine that much in my whole life. I am sure of that! The problem is not that big and probably not worth to be written on a blog post I am going to write it anyway because the solution was hard to find on the internet. Maybe this post will help you to fix the problem as I did and you will stop swearing to you machine as I did Let’s get to the point. I am no IIS guy! Seriously! The so called Cassini (the tiny web server which pops up when you run a web application on Visual Studio) was so enough for me for over 2 years. But no more enough. I figured that IIS can not be ignored by me anymore. How can I get that point? That’s not the issue here. The issue is that I tried to run an ASP.NET MVC 3.0 application under my local IIS 7.0 and got a very annoying error. Which is;
I right clicked on the Temporary ASP.NET Files folder and go to the security tab. I noticed that there is user called IIS_IUSRS and that guy has the full control permission. But apparently that was not enough. The Temporary ASP.NET Files and C:\Windows\temp folders should have IIS_WPG and NETWORK SERVICE users with the full control permission. I have no idea why C:\Windows\temp folder needs that but I have no effort left to try to find that. Instead, I am writing a blog post about the problem. Maybe latter I will get to that and figure it out, too Once you applied those setting, restart your IIS and try to run your application again. The error should be gone by now. I suffered a lot by trying to find the right method for the problem and I hope you didn’t have to go through hell over this. Hope this helps Comments
#2096
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Tugberk on 03/24/11 10:56:33 Thursday (UTC +00:00)
@daniel this problem took nearly half of my day. hope that you make it fixed quicker.
#2127
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Caelen on 05/27/11 15:17:58 Friday (UTC +00:00)
Thanks for this, you helped us big time. We just installed the service pack on production and were down for 20 minutes when we found your post. Once again thanks for sharing
#2128
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Tugberk on 05/27/11 16:52:34 Friday (UTC +00:00)
@Caelen I opened a thread about this on serverfault.com because I am not sure if this thing comes with some bad things. please see it as well;
#2135
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by amal on 06/01/11 13:59:23 Wednesday (UTC +00:00)
You are great.
#2153
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by sephiroce on 07/20/11 8:40:45 Wednesday (UTC +00:00)
really thank you!! it perfectly works for me!!!
#2154
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Yaroslav on 07/20/11 12:29:18 Wednesday (UTC +00:00)
hmmm I tried set permissions manually and tried aspnet_regiis -ga command, but I still have this error...
#2301
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Chris on 01/14/12 0:57:46 Saturday (UTC +00:00)
Thanks a ton!
#2324
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by John on 01/28/12 16:19:10 Saturday (UTC +00:00)
Thanks a lot man.
#2335
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by suhail on 02/06/12 8:49:57 Monday (UTC +00:00)
issue resolved. Great post!!! you saved my life...
#2425
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Clint on 03/18/12 17:37:34 Sunday (UTC +00:00)
Thanks a ton!
#2744
after 2 dias waiting for a solution from our hosting company I decide to apply your solution and it works perfectly.
Thanks a lot. In this case we have pp_wpg instead of iii_wpg
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by gbarret on 12/21/12 0:03:34 Friday (UTC +00:00)
#2780
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Eman on 01/10/13 16:15:08 Thursday (UTC +00:00)
Thank you very much! this is very helpful!
#2820
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Mikhail Sokolov on 02/15/13 12:26:12 Friday (UTC +00:00)
there is the another way to solve this problem: in IIS go to the application pools -> right click on your pool -> advanced settings - >change identity property to Custom account (write login and password).
#2901
re: Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files
by Dam Patel on 05/23/13 4:21:18 Thursday (UTC +00:00)
Thank you very much! this is very helpful! Additional allowed tags : [quote]...[/quote], [user]...[/user]
|
Keep in Touch with MeTagsArchive
Blogroll |





thank you so much.
same with .net 2.0 iis 7.5
problem solved