Home "Error: cs0016 could not write to output file ... access is denied"

# "Error: cs0016 could not write to output file ... access is denied"

Manickam Chidhambaram
1#
Manickam Chidhambaram Published in 2012-06-11 05:09:52Z
 How can I fix the following error? error: cs0016 could not write to output file...c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\sitename\6c57f9d2\bb09b49d\App_global.asax.5odzsyz5.dll' access is denied
niltoid
2#
 I was struggling with this problem for a while. Found some solutions on the web that involved setting permissions on the "Temporary ASP.NET Files" directory in the error message. But even opening it up to "Everyone" didn't work. Then eventually the following steps fixed it: Go to the IIS AppPool for this site Right-click the app pool and go to Advanced Settings Change Identity from "ApplicationPoolIdentity" to "NetworkService" There may also be some other necessary steps, which I did while troubleshooting, but this is the key step. For some reason the App Pool Identity (such as IIS_APPPOOL\SiteName) isn't granted access when "Everyone" is. I'm sure someone else can shed some light on why this is the case... Hopefully this helps others resolve this frustrating issue.
user2118400
3#
Jako
4#
 I've fixed this issue setting full control for 'NETWORK SERVICE' to the system temp: C:\Windows\temp The error message reported by the web server is a bit misleading. Hope this helps.
leshy84
5#
 I had the same problem. Found an easy way to resolve: Set "Load user profile" to true in app pool's advanced settings.
user2502767
6#
 For Windows 7 Set Full Control Permissions on folder C:\Windows\Temp for user IIS_IUSRS Network Service user usually only applies on servers