Reputation: 291
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
Upvotes: 21
Views: 57927
Reputation: 11
Just just need to set permissions for "Temp" folder.
All done.
Upvotes: 1
Reputation: 71
I tried all the options here without any luck. What worked for me was to simply remove the application pool and recreate it.
No need for extra permissions on any folder.
Upvotes: 1
Reputation: 1
I Had tried like give the permissions and change in IIS regarding the identity but I was getting same error.
I just keep the following files underneath the path "C:\Windows\Microsoft.NET\Framework\v4.0.30319" and problem is gone.
Upvotes: 0
Reputation: 133
Go
C:\Windows\Temp
Right Click on Temp Folder > go To Security Click on Edit
Add New User [IIS_IUSRS] AND GIVE IT FULL PERMISSION. Then Press Ok,
Upvotes: 1
Reputation: 4067
For Windows 7 Set Full Control
Permissions on folder C:\Windows\Temp
for user IIS_IUSRS
Network Service
user usually only applies on servers
Upvotes: 4
Reputation: 1506
I have all permissions about writing and reading but I'm starting to get that error.
I can suggest "restart machine" At least, it works for me
Upvotes: -1
Reputation: 700
I had the same problem. Found an easy way to resolve: Set "Load user profile" to true in app pool's advanced settings.
Upvotes: 13
Reputation: 328
I found the accepted answer on this post to be correct in process. I tried "NetworkService" and it did not work. However "LocalSystem" did!
Upvotes: 3
Reputation: 2577
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.
Upvotes: 19
Reputation: 486
After spending hours on this issue myself below is the solution that worked for me on Windows 7 running IIS 7.5:
The application pool identity associated with the site was not a member of the IIS_IUSRS group. To add the app pool identity to the group I used the following steps:
Repeat steps 7 through 8 for each app pool identity you wish to add. Click OK.
Now the app pool identity is a member of the IIS_IUSRS group which should already have access to the Temporary ASP.NET Files directory. After all that I was still receiving the error and I found (thanks to process monitor) it was because the app pool identity could not write to the windows temp directory. To resolve this I added the IIS_IUSRS group to the windows temp directory with read/write permissions.
Upvotes: 35
Reputation: 839
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:
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.
Upvotes: 15