Connection.State Issue

Posted by Mostafa on Stack Overflow See other posts from Stack Overflow or by Mostafa
Published on 2010-05-02T05:55:52Z Indexed on 2010/05/02 5:57 UTC
Read the original article Hit count: 423

Filed under:
|

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 ?

© Stack Overflow or respective owner

Related posts about connection

Related posts about ASP.NET