i developed my app using Asp.net and it hosting iis.After running App i Click sub menu pages more than 20 times then i am geeting
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
please reply As soon As possible
Thanks in Advance .
regards
venkatesh

Ck NitinRank #189 · 12.9K reputationPosted Sep 25, 2014, 11:41 PM EDT
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
command.ExecuteNonQuery();
}
venkatesh v9 reputationPosted Sep 26, 2014, 1:07 AM EDT
regards
venkatesh v
Arunava BhattacharjeeRank #635 · 3.8K reputationPosted Sep 26, 2014, 1:41 AM EDT
You missed it somewhere for sure if you are not "using()"
venkatesh v9 reputationPosted Sep 26, 2014, 1:56 AM EDT
Arunava BhattacharjeeRank #635 · 3.8K reputationPosted Sep 26, 2014, 2:59 AM EDT
You can set Max Pool Size in your connection string. By default probably it supports 100 as I remember. But you don't have to worry about it. You need to close your connection in the finally block or you can use the using block to open your connection. That's enough.
Mark this as accepted answer if you are satisfied.