• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

MaxConnection does not have effect on ASP.NET 2.0

MSDN Blogs > Never doubt thy debugger > MaxConnection does not have effect on ASP.NET 2.0

MaxConnection does not have effect on ASP.NET 2.0

Carlo Cardella
31 Mar 2008 10:06 AM
  • Comments 3

An interesting change which you might have missed in .NET 2.0 is about the autoConfig setting for the <processModel> element. The customer was running out of available connections while accessing a remote web service and was trying to apply what’s suggested in Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications but apparently the change had not effect: a memory dump shown still 12 available connections even if he set MaxConnection=96. Interesting to note that reverting the application to .NET 1.1 the problem disappeared.

The different behavior is determined by the autoConfig value, which affects only ASP.NET applications and not Console, WinForm etc… (while the <processModel> threading configuration in .NET 1.x affected all .NET apps running on the machine):

Specifies whether to automatically configure the following settings to achieve optimal performance based on the machine configuration:

  • The maxWorkerThreads attribute
  • The maxIoThreads attribute
  • The minFreeThreads attribute of the httpRuntime element.
  • The minLocalRequestFreeThreads attribute of the httpRuntime element
  • The maxConnection attribute of the <connectionManagement> Element (Network Settings) element.

The values are set according to the KB article at http://support.microsoft.com/?id=821268.
This attribute does not affect the .NET Framework client applications; only ASP.NET applications.
The autoConfig attribute can be one of the following values.

  • True: Indicates that ASP.NET automatically configures the attributes in the preceding list to achieve optimal performance based on the machine configuration.
  • False: Indicates that ASP.NET should use the explicitly defined values for the attributes in the preceding list.

The default in the Machine.config file is True, unless there is a previously existing configuration.

If you don’t like this auto threading feature you can simply set autoConfig=”false” or set System.Net.ServicePointManager.DefaultConnectionLimit=<your value here>

 

Carlo

Quote of the day:
The male is a domestic animal which, if treated with firmness, can be trained to do most things. - Jilly Cooper
  • 3 Comments
ASP.NET, CLR
Leave a Comment
  • Please add 2 and 7 and type the answer here:
  • Post
Comments
  • Steven Cheng's MSDN Notes
    6 Jan 2009 1:10 AM

    [WCF]Things that will impact concurrency &amp; capacity behavior of WCF service (with simoultaneous client

  • Never doubt thy debugger
    19 Feb 2009 5:34 PM

    A couple of days ago I was helping a colleague of mine with some tests and I had the need to change the

  • BD Kol
    2 Mar 2012 9:02 PM

    Environment: IIS 7.5, .Net 4.0, 2008 R2, Integrated Mode.

    In machine.config, if processmodel - autoConfig="false", what is the default value of maxconnection? Assuming that, in Integrated Mode, value specifed in web.config will be ignored.

    Other than setting the value programatically, is there any way to set maxconnection when autoConfig="false"?

Page 1 of 1 (3 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223