This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
When you have an application that uses ASP.NET and System.Data.SqlClient with the SqlConnection.ConnectionString property Pooling value set to true, you may receive the following exception error message during a call to System.Data.SqlClient.SqlConnection.Open():
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Disable SqlClient connection pooling by setting the SqlConnection.ConnectionString property Pooling value to false. However, when you disable connection pooling, it can have a serious impact on performance. Therefore, Microsoft does not recommend that you do this. If you experience the problem that is described in this article, apply the fix that is provided in this article. For additional information about the implications of turning off connection pooling, click the following article number to view the article pooling in the Microsoft Knowledge Base:
328476 TCP/IP Settings for SQL Server Drivers When Pooling Is Disabled
The following warning is from this article:
Note that Microsoft strongly recommends that you always use pooling with the SQL Server drivers. Using pooling greatly improves overall performance on both the client side and SQL Server side when you use the SQL Server drivers. Using pooling also considerably reduces network traffic to the computer that is running SQL Server.
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Product Name service pack that contains this hotfix.
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:
NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name -------------------------------------------------------------- 16-Nov-2002 15:30 1.0.3705.378 1,179,648 System.data.dll
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.