I used to think that the first time the asp.net program was running slowly was due to the need to compile the program during the first running. Although I had doubts at the time, I did not go into details.
Today, I checked Microsoft technical documents and found this secret:
The first time the. net program runs slowly, the reason is that the digital signature must be verified during the first run.
When the program needs to call some Authenticode Signed. NET Assembly, it needs to connect to the Internet to verify the digital certificate. When the server cannot connect to the Internet, the process of verifying the certificate will not end until timeout.
Solution:
1. Enable Computer Connection
2. Certificate verification process prohibited
Certificate Validation process prohibited:
1,Add the following content to the aspnet. config file:
32-bit system: C: \ Windows \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet. config
64-bit system: C: \ Windows \ Microsoft. NET \ Framework64 \ v2.0.50727 \ aspnet. config
Content:
<?xml version="1.0" encoding="utf-8"?><configuration> <runtime> <generatePublisherEvidence enabled="false"/> </runtime></configuration>
2. Disable certificate check for all programs running under the "Network Service" account