Posted on: 2/26/2015 12:13:34 AM | Views : 548

I am getting this error when I try to get all the username password from production copied local database, I guess it is because of not closing the connection properly, but I am not sure how . I am using the Microsoft Enterprise Library, ant thought or comment about it?
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. this is the method that is getting the username and password and producing the error.

private Model.UsernameandPass GetUsernamePass(string AccountNumber) { Model.UsernameandPass model = null; string myConnection = System.Configuration.ConfigurationManager.ConnectionStrings[connectionName].ToString(); SqlDatabase db = new SqlDatabase(myConnection); using (DbCommand command = db.GetStoredProcCo ...

Go to the complete details ...