Link to home
Start Free TrialLog in
Avatar of Eric Christianson
Eric ChristiansonFlag for United States of America

asked on

Compiler Error Message: CS0016: Could not write to output file ... Access Denied

I (had) a perfectly functioning .Net Web Application developed in MS Visual Studio, written in C# with a MS SQL back end.  My development platform is MS Vista Ultimate.  I applied Service Pack 1 to my laptop and now I get the following message when I try to run my application:

Compiler Error Message: CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\lmol\ae64c201\60445e3d\App_Code.xo1s27td.dll' -- 'Access is denied. '

Looking through the internet there are many solutions but none that I know enough about the Windows development environment to implement.

I need someone to help me through where to find the right setting to change, and how to do that.  I am up against a wall here and kinda freaking out.
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

I applied Service Pack 1 to my laptop SP1 for vista or the Visual Studio? If for vista you should be at least service pack 2!
 You need to explicitly run Visual Studio as an administrator
Avatar of Eric Christianson

ASKER

Hi ve3ofa -

I have loaded all the updates that Windows Update says are available - Looks Like Office is SP3, but everything else is SP1 (Vista Ultimate).  There is a SQL Server Update SP4, but that's only for the Express version which I don't use.

Can you tell me how I can confirm that I am running VS as administrator?

Thanks!
SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Huh.  Windows Update doesn't list a major Windows Service pack.  Go Figure.

Ok, those boxes are checked.  I have installed SP2 of Windows Vista and am running VS as Administrator.  Same problem.

What can I try next?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi - I sent a response last night but somehow it got lost - I made the changes, rebooted, but I still receive the same error.  (See attachment)
Environment-Variables.jpg
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
no no no, don't set them to windows\temp but to c:\temp (create this folder) !!!!! reboot, try again and report back please
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Good Morning - I tried the (easy) one (creating and pointing to C:\Temp instead of C:\Windows \Temp), re-booted and I still have the same message, which I have attached.

I have to leave for the airport but I will get to these suggestions as soon as I can this evening or tomorrow morning.

Question for (ZOPPO) I am not finding 'App_Code.xo1s27td' in the TechNet article you referenced.  Is that where you want me to look?

Thank you all for the other suggestions - I will get to them asap.
VSErrorImage.jpg
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi All -

I am here at my clients and an IT guy looked at the problem for a while and discovered that the IIS_IUSRS had no permissions assigned to the C:\WINDOWS\TEMP folder.  Once permission was granted, the error went away.

Thank your for your help!