I check connection is available with code:
SqlConnection objConnection = new SqlConnection(string.Concat(connectionString));
try
{
objConnection.Open(); // this line make wait time if connection not available
objConnection.Close();
SqlConnection.ClearAllPools();
return true;
}
catch
{
return false;
}
When connection not available, It takes a long time to answer .how can reduce it?