After the system is released, right-click the web layer to generate a website and publish a website. Without hesitation, you can click Publish a website, select a website directory, and set a website through IIS, finally, the website will be published successfully, but what is the website generation? Is it possible to publish a website only after the website is successfully built? What is the difference between website generation and website publishing, see the following details:
Differences between website generation and website publishing in
Website generation: compile a website project.
We know that C # compilation languages like the same must be compiled into computer-recognized binary code before running a program. After the website is compiled, you can directly run the pre-compiled program when browsing the website, improving the browsing speed.
Website publishing: Compile the executable files on the website, write the results to the specified folder, and upload the files to the server or create settings in ISS for LAN browsing and access.
Conclusion 1:
The publishing website generates the corresponding DLL file for all Cs files on the website, and the CS file will automatically disappear;
Generate a website. All CS files exist.
Website released by ISS
When publishing a website in ISS, you can use vs to generate website files, or use the web layer in the original system. The following describes the differences between the two methods.
1. Use vs to generate a website file for publishing. The result is shown in Figure 1.
2. Use the web layer in the original system, as shown in result 2.
The results of a website generated in two ways can be accessed either on the local machine or on the LAN.
However, we can find that the content in figure 1 (newsweb) is less than the content in figure 2 (Web), and the few files are exactly. CS file, which can be seen from the figure. In fact, the folder in newsweb still exists. CS file.
Conclusion 2:
Website publishing with vs can play a security role.
The released file does not have a CS file, and there is an aspx Web file and the corresponding DLL dynamic link library file generated by the corresponding CS file. The DLL file is available and unreadable, in this way, data will not be leaked after being published.