I'm getting this compilation error again and again. i'm not able to resolve it permanently.

for debugging this error i clean the solution and rebuild the solution, sometimes it's working and sometimes it's again showing same compilation error.

please tell me the permanent solution for this problem.

Server Error in '/' Application.


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: CS0006: Metadata file 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\014679fc\1b393534\App_Web_glpoum5i.dll' could not be found
1

There are 1 answers

1
Abhilash Thomas On

The best answer for this please open you web.config file and add below two setting add in the compilation tag

<compilation targetFramework="4.0" debug="false" batch="false">

Keep coidng, Also i tried following things when i get the same error in my application which i tried to host in the server

  1. Click Start, click Run, type iisreset /stop, and then click OK.
  2. Open the C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files directory.
  3. Delete all files and all folders in the directory that you located in step
  4. Click Start, click Run, type iisreset /start, and then click OK.
  5. Do a build again and then try to access your site.