0
Microsoft (R) Visual C# Compiler version 4.6.1590.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.

This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240

error CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\8d0dec5c\beef09e6\App_Code.ax95x44c.dll' -- 'Access is denied. '

How to solve this issue? I tried many things giving permissions to the folders, installing this (Install-Package Microsoft.Net.Compilers -Version 2.2.0) etc but no result.

Please suggest. I am a beginner to programming.

halfer
  • 19,824
  • 17
  • 99
  • 186
Bangla Tiger
  • 89
  • 2
  • 14
  • You haven't given us any context here. Why is something trying to write to that directory? Normally you should be building code in the same area that your source code lives (e.g. in a subdirectory). Please provide a *lot* more context. – Jon Skeet Jul 10 '17 at 08:58

1 Answers1

0

Open a Developer Command Prompt for VS20xx (2012,2013,2015,2017). You can find this in the start menu. Then run this command:

aspnet_regiis -i

This should set up IIS to be run and oftentimes resolves this error. See this SO post for more info should that not work.

John Bindel
  • 243
  • 2
  • 8
  • in my local server the application is working fine. This error is showing when i am trying to run the applicaition online. i tried uploading by visualstudio ftp system and tried with filezilla too. thanks in advance for solution. – Bangla Tiger Jul 09 '17 at 20:16
  • Please add more info to the question about where you are trying to run the application, how the server is configured to host this, what user account it is under, and that user account's permissions to c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files. – John Bindel Jul 09 '17 at 20:19
  • this error is showing when I upload the application on the hosting server. the application is running well on my local server (localhost and localhost:1242). I assigned full control to IIS_IUSRS on ASP.Net Temporary files folder and c:/temp folder and did many thing. nothing worked. Please note that this error is occuring when i upload the application on the hosting server. – Bangla Tiger Jul 09 '17 at 20:32