Net pre-compilation is really useful or not

Source: Internet
Author: User

The company's mobile website has thousands of ASP. NET to develop a set of programs, but the configuration is different, the content displayed on all sites is different, the previous programs are ASP, And now ASP programs are rare, so the company requires conversion. NET. NET is also used for new development. All the thousands of websites are now full of a set of NET programs, which are easy to write, but going online is a slow process. 16 walnut servers with the best configuration have been changed, it would take more than half an hour to compile all websites. If a BUG is released, LZ may be broken down. Baidu had a bit, Net pre-compiled, and finally after an afternoon of research,. Net pre-compiled commands are pre-compiled for a site at a time, and it also takes time to execute them. In this way, even if all the pre-compiled commands take more than N times, they cannot be obtained, it is better to ask the user to compile the website. Later, the idea of zl was changed. Instead of compiling all the sites, pre-compile some sites with high traffic and go to the first 300 sites. This is much better, let's think about it. Okay, let's get started with the method.

Net pre-compiled command

C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_compiler.exe -? Display description

We need to select the command aspnet_compiler.exe-m IIS metadatabase (but how to obtain the IIS metadatabase)

Use IIS resource management tools: http://download.csdn.net/detail/cake_green/6756847 this points ha you can also Baidu

Open Metabase. You can find the Metabase address of your website. Now, with the IIS website metadatabase address, we can pre-compile NET. Everything is ready.
Zl selects the TOP 300 websites to write scripts first

 /f %%i  (wap1.txt)  C:\WINDOWS\Microsoft.NET\Framework\v2.\aspnet_compiler.exe -m %%i

Save the script as. bat.

The wap1.txt file is your IIS metadatabase address.

Why should I add a number to the file name to be traversed by zl? Correct? There will be many such script files and many multi-process technologies.

The same content is that the file names to be traversed are different. These 300 sites execute 30 scripts each time. This is faster.

Finally, let's talk about the procedure.

1. Stop IIS
2. Update the latest program
3. Enable precompile (1-10). bat at the same time.
4. precompile (1-10). After bat exits, start IIS

There is no technical content, but it can help lz to do the necessary work well. Let's try it.

 

A friend asked me which website is so ** there are thousands of servers. If there is not a lot of mobile website traffic, I 'd like to advertise it.
Second-and third-tier city portal website Baidu search city name + city online must have your 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.