3

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

svick
  • 236,525
  • 50
  • 385
  • 514
RSuthke
  • 433
  • 1
  • 5
  • 9
  • Please contact your assigned Microsoft representative for source code. Or use Reflector, available at a nominal fee to anybody, including you. – Hans Passant Sep 09 '11 at 23:34
  • @Hans, or use dotPeek, which is free. And I think this isn't something that should require exploring .Net's source code. It should be mentioned in the docs. – svick Sep 09 '11 at 23:40
  • 2
    I actually meant the source of the information, not actual software source, sorry for the confusion. – RSuthke Sep 11 '11 at 00:37

1 Answers1

6

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.

svick
  • 236,525
  • 50
  • 385
  • 514