. Net website release Summary experience-Allow updating this pre-compiled site

Source: Internet
Author: User
We can use the following method to publish the vs2005 Website:

"Generate"→"Publish website"; A dialog box is displayed!

In the displayed dialog box, an option is crucial, that is,"Allow update of this pre-compiled site";

"Allow update of this pre-compiled site". By default, the prefix is marked with a √. It is optional if you want to add a √, what is the difference between tick and not tick?

You may have published a net website. Generally, all Cs files in the website project will automatically generate a DLL dynamic link library, which can effectively protect the website.Source codeBecauseCodeGenerally, it is stored in the CS file. Since all DLL files are generated, you can upload them to the virtual space, and others will not be able to open them!

However, other files, such as ashx and aspx, have what they used to be. Others can open these files to view them, even though they cannot see the CS code, however, you can still see the HTML code in the aspx file or some server controls and related attributes;

In addition, a file like ashx is equivalent to a CS file, and the code in it can also be seen.

Therefore, CS files are safe, but files such as aspx and asxh on the website are insecure. For the entire website, only local security is required, but not overall security.

Is there any way to secure all website files uploaded to a virtual space? There are some methods. You can achieve this by "allow updates to this pre-compiled site;

① Tick "allow update of this pre-compiled site"

If you check this item and then publish the website, the result is as follows: the entire website file, except all the CS files compiled into a DLL file, other files, there is no change with the original one. What is in it or what, as long as someone else opens it through notepad, the code and HTML code in it can all let others see at a glance.

In addition, when a user accesses a page for the first time, the website published in this way needs to be compiled and searched for bugs. If there are no errors, the website can be accessed normally, the speed will become slower. (Second, third ...... The access speed is normal)

② Cancel the √ above "allow update of this pre-compiled site"

If you cancel the check box before "Allow to update this pre-compiled site" when releasing the website, the result is as follows:

1. All CS files on the website are compiled into a DLL file;

2. In addition to CS files, other files, such as aspx and ashx, are also compiled together. Each file generates a corresponding *. compiled file in the bin directory;

After that, if you use NotePad to view files such as aspx and ashx, you will not see any code in it, or even HTML code marks. open such a file with only one line of text in it, the content is "this is the mark file generated by the Pre-compilation tool and should not be deleted!"

However, website access is normal without any adverse problems.

Therefore, if you use this method to publish a website, you cannot open any file in Notepad. All the text lines are displayed. Therefore, the website file is very secure.

In addition, all the content of the website published in this way is compiled and opened quickly.

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.