Symptoms
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: CS0012: The type 'AspDotNetStorefront.Global' is defined in an assembly that is not referenced. You must add a reference to assembly 'App_Code.f291gd7j, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source Error:
Line 137: }
Line 138:
Line 139: protected ASP.global_asax ApplicationInstance {
Line 140: get {
Line 141: return ((ASP.global_asax)(this.Context.ApplicationInstance));
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\c66d613c\d98401bb\App_Web_empty.ascx.5032c301.mg5-cbxu.0.cs Line: 139
Cause
The ASP.NET temp files could be corrupted.
Solution
You will notice the error states that the source file is located in ‘c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root’. Clearing out these files and restarting IIS should resolve the issue. If you can’t restart IIS because it is still using the files, then you may need to stop IIS first in order to delete those.
More Information
If the source files points to ‘c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root’ with a RANDOM character filename (i.e. 5032c301.mg5-cbxu, etc) in it, the given solution should also be applicable.