You need to close the connection. I have corrected your code below
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["database_con"].ConnectionString);
con.Open();
SqlTransaction trans = con.BeginTransaction();
try
{
SqlCommand cmd = new SqlCommand("select userid,amount from user_detail", con, trans);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
SqlCommand cmd6 = new SqlCommand("insert into payout(user_id,amount)values('" + dr[0].ToString() + "','" + dr[0].ToString() + "')", con, trans);
cmd6.ExecuteNonQuery();
}
}
catch()
{
}
finally()
{
con.Close();
}