Example of error information:
The following error information is an example of the exception type during running when you encounter these compilation problems:
Unable to cast object of Type 'asp. masterpage_master 'to type 'asp. masterpage_master '.
(You cannot convert an ASP. masterpage_master object to an ASP. masterpage_master object)
Or:
Cocould 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.
(Files cannot be loaded orProgramSet "app_web_e9dbmaj, version = 0.0.0.0, culture = neutral, publickeytoken = NULL" or its dependency direction. The system cannot find the specified file .)
Or:
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
(Compilation error message: cs0006: the metadata file "C: \ WINDOWS \ Microsoft. net \ framework \ v2.0.50727 \ temporary ASP. net files \ CMS. WEB \ 44e73607 \ b028acb3 \ app_global.asax.fakktchx. DLL ".)
Or:
System. invalidoperationexception: The resource class for this page was not found. Please check if the resource file exists and try again
(System. invalidoperationexception: The resource class on the current page cannot be found. Check whether the resource file exists and try again .)
Temporary solutions for these problems:
If an application starts to throw one of the preceding errors, you can apply a temporary solution immediately to open the web of your application. config File, set the batch attribute of the <compilation> section to false:
<Configuration>
<System. Web>
<Compilation DEBUG = "false" batch = "false"> </compilation>
</System. Web>
</Configuration>
This tells ASP. NET to dynamically compile a single. aspx/. ascx file into a separate assembly, which avoids the issue of triggering abnormal circular references.
You can also use the following steps to delete the files in the "temporary ASP. NET files" cache to temporarily solve this problem:
Click Start in windows, run, enter iisreset/stop, and click OK.
Open the driver letter: Windows \ Microsoft. NET \ framework \ v2.0.50727 \ temporary ASP. NET Files directory.
Delete all files and all folders in the directory you found in step 2.
Click Start, click Run, enter iisreset/start, and then click OK.