Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\wholesales\xxxxx\xxxxx\App_Code.xxxxxxx.dll' -- 'Access is denied. '
After some antivirus activities, my partner development machine face issue above.
This may due to some permission setting in Temp folder. To solve it,
1. Go to %Systemroot%, normally C:\WINDOWS or C:\WINNT
2. Right-click the Temporary folder (mine is C:\WINDOWS\Temp) and select Sharing and Security. Select the Security tab and take a look at the list of “Group or user names:”
3. NETWORK SERVICE should be in the list. If it is not, click Add and type Network Service in the text box:
4. Make sure NETWORK SERVICE have Full Control in the Permissions list.
5. Click OK.
6. Restart IIS (Run iisreset)
Test on the web, and it solved.
If you still have the same problem, please check whether you are using McAfee antivirus. If yes, it's probably cause by the access protected properties setting in mcAfee antivirus. Please make sure you unchecked "Prevent execution of scripts from the Temps folder" in "Access Protection Properties"
To do so, right click on McAfee icon in Taskbar and Click on "VirusScan Console..."
Double click on "Access Protection" and a new "Access Protection Properties" window will pop out. Make sure you unchecked "Prevent execution of scripts from the Temps folder" under Block column. Click OK to close all the window.
Problem should be solved.