Connection.State Issue
- by Mostafa
Hi
I've published my new website , In my computer it works fine and no problem , But in the Server I when some user connect at the same time it crash .
I found out There is a error at this Method :
public static DbDataReader ExecuteReader(DbCommand dbCommand, CommandBehavior commandBehavior)
{
if (dbConnection.State != ConnectionState.Open)
dbConnection.Open();
return dbCommand.ExecuteReader(commandBehavior);
}
When i trace it , It says ConnectionState is not open , and it's doing opening . Here are my questions :
1- Is it a problem if while ConnectionState is doing opening , we Open the connection again ?
2- What I've missed , that i receive this error ?