Asp.net 2.0 compiling model

Source: Internet
Author: User
Today, when a colleague "published" his own web application, he copied all the project (including all source code), which was very different. He explained it to her for a long time, but it was fruitless ~
It is reasonable to say that this release method is also understandable, but it is a bit uneasy to publish the source code.
In fact, in Asp.net 2.0, the compilation method is very unique: by default, when a user requests a page for the first time, the compiler will compile the page, and saved to a folder on the server (/Windows/Microsoft. net/framework/[version]/Temporary ASP.. Net files), no matter who requests this page again, the server will directly feedback this compiled page to users.
The server creates a temporary folder for each application. When the users requests, the server first finds whether the page class exists. If yes, the server returns the result. If no, the server recompiles the code, and temporary storage.
Of course, when the server creates this page class, it will also establish some connection between this class and the origin page. This connection is used to check whether the source file has been changed. If yes, it is also necessary to re-compile.

We usually use the "Publish Website" function to publish our applications or websites. You can set whether to generate all DLL files or retain HTML pages at the time of release. In this way, the page after the release is compiled.

What is the difference between directly publishing the source code and publishing the Code through the "Publish Website? (Except for security factors)
 
From the above description, we can see that, if we release it through sourcecode, it will be slow during the first visit, because the page for the request needs to be compiled; the latter avoids such "pain ";

In any case, when publishing a website or an application, it is better to "Publish a website.

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.