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.