After the website is published, a precompiledapp. config file is generated.

Source: Internet
Author: User

When you use Microsoft Visual Studio 2005 to develop an ASP. NET Website, A precompiledapp. config file will be generated when you release the website after development. What is the role of this file? Can I delete it? Will the normal operation of the website be affected after deletion? Thank you!

Question added:The precompiledapp. config file contains the following content:

<Precompiledapp version = "2" updatable = "true"/>

--------------------------------------------------------------------

You cannot delete the. precompiledapp. config file to track the application deployment mode and determine whether ASP. NET needs to compile any files during request.
Some application-level things cannot be used after deletion.

 

---------------------------------------------------------------------

Compile ASP. net2.0. There are three pre-compilation methods:
1. Allow UI pre-compilation updates
That is, only the CS files are compiled, and the page files like aspx are not compiled.
Ii. UI pre-compilation cannot be updated
That is, during compilation, not only the CS file is compiled, but the ASPX page file and the topic file are both compiled. Of course, the Web. config configuration file and images are not compiled.
Iii. Strong naming pre-Compilation
Instead of compiling the source file and naming the compiled file, they cannot replace your DLL file.
When completing this module, I will first consider the first two types, because using the third type is a bit of an overhead. I am wandering in the first two ways, so I have been repeatedly testing the convenience of integrating the files compiled by the first two methods with the overall test in the customer's development. I want to give the client the least simple file, so I deleted the precompiledapp in the test of the second method. config file, and then let the IIS Directory point to the compiled file. The result shows "this is a mark file generated by the Pre-compilation tool and should not be deleted!" So I added the precompiledapp. config file to display the result normally. In fact, it is not so easy to find that precompiledapp. config is affected by IIS cache. In this process, you must restart IIS. The last check shows that the file is a tag, which notifies the ASP. NET Runtime Library that the application has been pre-compiled, so it cannot be properly displayed without the second method program.
It is said that the precompiledapp. config file is also associated with the event in the global. asax file, but I have not tested it yet and have the opportunity to test it.

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.