How to Set asp. NET connections

Source: Internet
Author: User

When a stress test is performed or the server requests a specific domain name, the connection volume at the same time is by default. the. NET Framework is limited. It takes effect only after being set. I found this problem only after checking that the stress test has not been submitted. The main setting parameter is: System. net. servicePointManager. defaultConnectionLimit:

System. net. servicePointManager. defaultConnectionLimit is set to 2 by default in a windows program. If the value is not set, it may be a little larger, but it will not exceed 100. You can set this value to a greater value, but if it is set to a smaller value, the configured value prevails.

System. Net. ServicePointManager. DefaultConnectionLimit is regarded as 12 * N, and N is the number of CPU logic.

This parameter may also be set. The default value of System. Net. ServicePointManager. MaxServicePoints is 0, which is the value of ServicePoint, but it is never used. If it is 0, it indicates no restriction.

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.