?? C # web project release Problems

Source: Internet
Author: User
Http://zhidao.baidu.com/question/238013871.html

What are the advantages of uploading source code to the server after the source code is published? If some statements in the source code are modified after the post-release upload, do you need to re-release and re-upload all the statements? If not, which files should be uploaded after modification?
Let me tell you this, that is. net uses the compilation method to generate binfiles for your code, so that every time you change the background code in the project, you only need to update the binfile, but if you change the page, you need to update the page, that is, to change the background code, you only need to update the binfile of the server.
Suggestion: it is best to delete all the CS files when uploading them to the server. The truth is not enough.

Publish a website, that is, pre-compile the website.
After the website is published, the. CS files under the app_code directory and the. aspx. CS files corresponding to the. ASPX page will be compiled into DLL files and saved in the bin directory.
The reason for this is pre-compilation because, even if the source code is not directly uploaded, the website must be compiled before it can run when it is accessed. This is all done automatically, it takes some time, so it is usually slow when the website is started for the first time.
Pre-compilation completes this compilation in advance, so you do not need to compile it when accessing the website, which improves the website performance to a certain extent.
If the code under app_code is modified after the release, you only need to replace the compiled bin \ app_code.dll. however. aspx. CS file, it is best to re-upload all, because. aspx. the name of the corresponding DLL file generated by CS is not fixed. If it is not replaced correctly, the page will not run. if you have modified. aspx files must be re-transmitted because. the aspx file will be modified during compilation.

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.