Asp.net 2.0 is really killing.

Source: Internet
Author: User
Problems encountered after the upgrade have never been seen before.
A bunch of errors and prompts appear in the log, prompting that the verification ticket provided by the user is invalid. I understand this, because the cookie used by the user in 1.1 Algorithm It is different from 2.0. Therefore, users are considered to provide illegal cookies, which can be ignored. The error is an unprocessed exception and the value cannot be blank. The details of this error are strange. The page information is very random, but I did not find any unhandled exceptions. Later, it was found that a user had been providing illegal data to the server, and the server did not perform too many checks before using the returned data. For example, the number was directly indicated by Int. parse. This causes an exception. But the entire section here Program Is executed in a try block.
The most serious problem is that w3wp.exe will suddenly restart, and the log record is that the ISAPI detects a deadlock. Later, no source of deadlock was found. Now, the system will be re-compiled, and I have used aspnet_compiler.exe to compile it completely. Furthermore, the Compilation Time is extremely slow. After reading the log, the deadlock error occurs again several minutes after compilation, so it is restarted and compiled again.
When all the CPUs are fully occupied, the process that comes in will remain waiting, and the original process is hard to return. As a result, the system automatically restarts the w3wp.exe file which is being compiled. However, it does not know that it is not the others who wait for resources and seize resources, but itself. As a result, the entire website is in this endless loop.
Compile process.
After several days of hard work, we can summarize some things. To update the website, we must take at least these steps:
1. There are two identical websites in IIS, one for normal services and the other for updates. Depends on the host header.
2. Before the update, ensure that the external service is completely normal, and that no one will access it.
3. Update the internal website and enable aspnet_compiler to compile it completely.
4、tests the internal website, and click a few more pages. it is guaranteed that csc.exe will not be started for compilation.
5. Switch the host headers of the two sites and update their locations. This step is just a little faster. I have not found any script method to do this. You can also change the external host header to www, change the other one to no host header, and then change the WWW header to another one. In this way, there will be no problems.
In this way, the user will not feel the pause, and will not let the entire site into a vicious circle of compilation.
Last time many people asked about the specific usage of aspnet_compiler:
C: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_compiler-M/lm/w3svc/534451290/root-C
-M indicates that the website is compiled based on the site path. It will automatically find the site file based on the path, which must be compiled when multiple sites exist. If only one site is differentiated by virtual directory, use the-V and-P parameters. The number in the middle of the path is displayed on the IIS management interface. The default site is 1. -C indicates that the system must be re-generated; otherwise, the incremental compilation is required.
This process is local compilation, and the compilation result is directly put into the. NET cache directory. In this case, we will not compile csc.exe again.

PS server environment: Xeon 3.4g x 2, dual-core, 4G memory (3.5G actually visible), hard disk 72X3 RAID 5.

Related Article

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.