Several ASP. NET 2.0 compilation Defects

Source: Internet
Author: User

In the past year, we have found and fixed several problems encountered in the report.ASP.NET 2.0 compilation defects.

There are multiple causes of these defects, but the root cause is usually related to the project structure, which has a special cross-page circular dependency. These defects are often triggered when large file changes occur on the system (for example, an antivirus program updates all timestamps on many files at the same time.

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'.
(Unable ASP.Masterpage _ MasterType object ASP.Masterpage _ MasterType)

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.
(The file or assembly "App_Web_e9dbmaj, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null" or its dependency direction cannot be loaded. 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" cannot be found 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 tellsASP.NET to dynamically compile a single. aspx/. ascx file into a separate assembly, which will avoid triggering abnormal loop references.

You can also follow these steps to delete "TemporaryASP.. NET Files:

  1. Click WindowsStartClickRun, Enter iisreset/stop, and then clickOK.
  2. OpenDriver letter: WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ TemporaryASP.. NET Files directory.
  3. Delete all files and all folders in the directory you found in step 2.
  4. ClickStart, ClickRun, Enter iisreset/start, and then clickOK.

You can find the details of these temporary solutions in Microsoft KB article #934839 (Chinese Version of machine translation.

The QFE HotFix patch for these problems can now be downloaded:

[Note: QFE = Quick Fix Engineering, Quick repair project]

As an alternative to the above temporary configuration file solution, you can also download and Apply Microsoft's QFE HotFix patch, which fixes the compilation problems we see reported by others.

The direct download link of the QFE HotFix patch for this compilation problem is here. You can find other common Visual Studio and. NET Framework QFE HotFixes on this webpage.

Important Notes: Some people sometimes ask me if they should install QFE HotFixes on their own initiative (before they encounter a problem ). I always recommend that you do not do this, because QFE hotfixes only performs Targeted tests to confirm that a specific problem is solved, but does not pass the end to end sign-off of the entire product (from beginning to end, each step has a signature and consent, so it is OK ). Therefore, I suggest that you apply this only when you encounter these targeted problems.

Contact Microsoft Product Support:

If you have any problems when installing the patch or you still see compilation problems after installation, you need to contact Microsoft Product Support for further debugging. The phone number supported by Microsoft products is free, for example, for product defects (whether it is a QFE HotFix request or a product defect ). On this page, you can find details on how to contact Microsoft Product Support (this page allows you to query local phone numbers by country ).

In most versions of Visual Studio, product support ticket is provided free of charge (for example, 4 support coupons for each subscription of VS Pro with MSDN Premium ). You can use these coupons to get them. NET or Visual Studio help (for example: help you find defects or performance problems in your own coding, or learn how to use a feature in the framework or IDE ).

There are some very, very good engineers in Microsoft Product Support. If you have any problems, it would be a great pleasure to work with them. Below are some wonderful blogs in the. NET Framework/Visual Studio space that I strongly recommend you subscribe:

  • Tess: http://blogs.msdn.com/tess/
  • Doug: http://blogs.msdn.com/dougste/
  • Carlo: http://blogs.msdn.com/carloc/
  • Rahul: http://blogs.msdn.com/rahulso/
  • Jerry: http://blogs.msdn.com/jorman/
  • Johan: http://blogs.msdn.com/johan/
  • Todd: http://blogs.msdn.com/toddca/

If you encounter a problem that you cannot solve, Or you encounter a problem that requires first aid in productive applications, call Microsoft Product Support, you will encounter people like the ones listed above, and connect you to a debugger to help you diagnose the problem.

Thank you.

[Original address] Public Hotfix Patch AvailableASP.NET Compilation Issues
[Original article publication date] Wednesday, 2017l 11,200

In the past year, we have found and fixed several problems encountered in the report.ASP.NET 2.0 compilation defects.

There are multiple causes of these defects, but the root cause is usually related to the project structure, which has a special cross-page circular dependency. These defects are often triggered when large file changes occur on the system (for example, an antivirus program updates all timestamps on many files at the same time.

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'.
(Unable ASP.Masterpage _ MasterType object ASP.Masterpage _ MasterType)

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.
(The file or assembly "App_Web_e9dbmaj, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null" or its dependency direction cannot be loaded. 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" cannot be found 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 tellsASP.NET to dynamically compile a single. aspx/. ascx file into a separate assembly, which will avoid triggering abnormal loop references.

You can also follow these steps to delete "TemporaryASP.. NET Files:

  1. Click WindowsStartClickRun, Enter iisreset/stop, and then clickOK.
  2. OpenDriver letter: WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ TemporaryASP.. NET Files directory.
  3. Delete all files and all folders in the directory you found in step 2.
  4. ClickStart, ClickRun, Enter iisreset/start, and then clickOK.

You can find the details of these temporary solutions in Microsoft KB article #934839 (Chinese Version of machine translation.

The QFE HotFix patch for these problems can now be downloaded:

[Note: QFE = Quick Fix Engineering, Quick repair project]

As an alternative to the above temporary configuration file solution, you can also download and Apply Microsoft's QFE HotFix patch, which fixes the compilation problems we see reported by others.

The direct download link of the QFE HotFix patch for this compilation problem is here. You can find other common Visual Studio and. NET Framework QFE HotFixes on this webpage.

Important Notes: Some people sometimes ask me if they should install QFE HotFixes on their own initiative (before they encounter a problem ). I always recommend that you do not do this, because QFE hotfixes only performs Targeted tests to confirm that a specific problem is solved, but does not pass the end to end sign-off of the entire product (from beginning to end, each step has a signature and consent, so it is OK ). Therefore, I suggest that you apply this only when you encounter these targeted problems.

Contact Microsoft Product Support:

If you have any problems when installing the patch or you still see compilation problems after installation, you need to contact Microsoft Product Support for further debugging. The phone number supported by Microsoft products is free, for example, for product defects (whether it is a QFE HotFix request or a product defect ). On this page, you can find details on how to contact Microsoft Product Support (this page allows you to query local phone numbers by country ).

In most versions of Visual Studio, product support ticket is provided free of charge (for example, 4 support coupons for each subscription of VS Pro with MSDN Premium ). You can use these coupons to get them. NET or Visual Studio help (for example: help you find defects or performance problems in your own coding, or learn how to use a feature in the framework or IDE ).

There are some very, very good engineers in Microsoft Product Support. If you have any problems, it would be a great pleasure to work with them. Below are some wonderful blogs in the. NET Framework/Visual Studio space that I strongly recommend you subscribe:

  • Tess: http://blogs.msdn.com/tess/
  • Doug: http://blogs.msdn.com/dougste/
  • Carlo: http://blogs.msdn.com/carloc/
  • Rahul: http://blogs.msdn.com/rahulso/
  • Jerry: http://blogs.msdn.com/jorman/
  • Johan: http://blogs.msdn.com/johan/
  • Todd: http://blogs.msdn.com/toddca/

If you encounter a problem that you cannot solve, Or you encounter a problem that requires first aid in productive applications, call Microsoft Product Support, you will encounter people like the ones listed above, and connect you to a debugger to help you diagnose the problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.