Устранение ошибки компиляции ASP.NET сайта

В случае получения в Microsoft .NET Framework 2.0 ASP.NET Web application следующих ошибок:

  1. Exception type: FileNotFoundException Exception message: Could not load file or assembly 'App_Web_-e9dbmaj, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
  2. Compiler Error Message: CS0006: Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\cms.web\44e73607\b028acb3\App_global.asax.fakktchx.dll' could not be found
  3. Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'
  4. Could not load file or assembly 'App_Web_e9dbmaj, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
  5. Compiler Error Message: CS0006: Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\cms.web\44e73607\b028acb3\App_global.asax.fakktchx.dll' could not be found
  6. System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again

нужно проделать следующее:

  1. Click Start, click Run, type iisreset /stop, and then click OK.
  2. Open the DriveLetter: WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files directory.
  3. Delete all files and all folders in the directory that you located in step 2.
  4. Click Start, click Run, type iisreset /start, and then click OK.

 В web.config выставить: <compilation debug="false" batch="false" />

 Если это все тоже не помогает, тогда \WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i