RSuthke
RSuthke

Reputation: 443

ServicePointManager.DefaultConnectionLimit scope

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

Upvotes: 3

Views: 1677

Answers (1)

svick
svick

Reputation: 244777

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.

Upvotes: 6

Related Questions