My app keep on throwing a :

System.InvalidOperationException

with the message:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool.

since upgrading to VS.Net 2003.

It seems that with SQL Server Debugging turned on in :

Project -> Properties -> Configuration Properties -> Debugging -> SQL Server Debugging

The connection to the SQL Server isn't closed even when I have a cn.close in my code.

When I turn off the SQL Server Debugging the connection closes properly. This is my code to recreate the error.

Dim i As Integer
For i = 1 To 1000
Dim cn As New SqlConnection
cn.ConnectionString = "Initial Catalog=MyDB;Data Source=MyPC;User ID=sa;password=;Connection Timeout=5"

cn.Open()
cn.Close()
Console.WriteLine(i & " connections opened")
Next
End Sub

With SQL Server Debugging turned on the exception is thrown every time after opening 100 connections. The exact same code runs fine when it's turned off.

Has anyone encountered this problem and is there a fix available? I really need the SQL Debugging feature in some of my projects.