Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ServicePointManager.DefaultConnectionLimit scope

Does changing ServicePointManager.DefaultConnectionLimit affect only the current process or the whole .NET platform. Please provide source.

like image 247
RSuthke Avatar asked Jul 29 '26 09:07

RSuthke


1 Answers

Setting properties of ServicePointManager pretty much does just that – it sets some static properties. (The actual code is more complicated than that, but I think that doesn't matter here.)

Those properties are used when creating new ServicePoint objects.

What follows from this is that their effect is as wide as for any other static property – that is one AppDomain.

While one process can have more than one AppDomain, most of the time, you deal only with one AppDomain per process. So, most of the time, setting the property affects the whole process. Sometimes not even that. It certainly doesn't affect other processes.

like image 173
svick Avatar answered Jul 31 '26 22:07

svick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!