How to Solve Max Connection Pool Error

后端 未结 4 1623
执笔经年
执笔经年 2020-12-05 10:10

I have a application in asp.net 3.5 and Database is Sql server 2005.

\"Timeout expired.  The timeout period elapsed prior to obtaining a connection from the          


        
4条回答
  •  生来不讨喜
    2020-12-05 10:43

    May be this is alltime multiple connection open issue, you are somewhere in your code opening connections and not closing them properly. use

     using (SqlConnection con = new SqlConnection(connectionString))
            {
                con.Open();
             }
    

    Refer this article: http://msdn.microsoft.com/en-us/library/ms254507(v=vs.80).aspx, The Using block in Visual Basic or C# automatically disposes of the connection when the code exits the block, even in the case of an unhandled exception.

提交回复
热议问题