Last post Sep 18, 2008 08:24 AM by tasmin
Jul 13, 2008 01:06 PM|Paul Lethers|LINK
I am getting an 'Access Denied' message in the web browser when I try to set up IIS for my local testing. I get the same message when I set up a brand new project with no changes. Here are the steps when I create a new project:
Within VS2008, I select New / Project... and select the 'ASP.NET Web Application' option then press 'OK' without changing any of the default settings. Within SolutionExplorer I select the project (WebApplication1), right-click and select the 'Properties'
option. I then select the 'Web' tab and select the 'Use IIS Web Server'. The Project Url text box defaults to 'http://localhost/WebApplication1' which I leave unchanged. I then press the 'Create Virtual Directory' and receive a dialog stating that the virtual
directory was created successfully. I then press F5.
The message in the browser is:
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\Microst.NET\Framework\v2.0.50727\Temporary ASP.NET Files\webapplication1\1404a02d\810bba38\App_Web_default.aspx.cdcab7d2.maywwsln.dll' - Access is denied.'
Any clues or help would be greatly appreciated!
Jul 13, 2008 04:39 PM|TATWORTH|LINK
I suggest that you check the permissions on
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
Make sure that your account and any other relevant account used for running the web sites has full access to the directory. It is also necessary sometime to clear this directory.
Jul 13, 2008 05:48 PM|Paul Lethers|LINK
Thank you for the reply but how do I go about checking the permissions of my account?
Jul 13, 2008 10:46 PMemail@example.com|LINK
Browse to the folder in Windows Explorer, right-clcik and choose Security or Properties.
Jul 14, 2008 11:27 AM|Paul Lethers|LINK
Thank you for your response. As you instructed, I went to the properties window for the folder 'Temporary ASP.NET Files' and under the Security tab I was able to change the permissions of myself and all the groups listed to 'Full Control' except a group
called 'CREATOR OWNER'. For 'CREATOR OWNER' when I checked 'Full control' and pressed 'Apply' the window would revert back to having 'Full Control' unchecked. The properties window also has an 'Effective Permissions' tab under Security / Advanced which shows
that all groups and myself have 'Full control' except this 'CREATOR OWNER'. I tried to solve this issue by taking ownership of the folder but still, 'Full control' was reset to unchecked.
Also, I published my simple one page to my web host (www.lethers.net/pinktreetest) and it displayed with no problems.
I've googled this issue ('iis7 testing CS0016: Could not write to output file') and found that there are others that may have a similar issue,
http://forums.iis.net/p/1149761/1871241.aspx so it might be possible that this is a bug of some sort.
Do you have other suggestions I could try? And thank you again for your help.
Sep 18, 2008 08:24 AM|tasmin|LINK
I had a similar problem, and after a lot of anguish, I finally figured out that itwas my McAfee antivirus preventing writes to that .Net temp folder. I added to the list of exceptions in McAfee, the executables that it showed it had blocked, and now it works!