The connection is already Open (state=Open).

Discussion in 'ASP.NET / ASP.NET Core' started by jpelski, Jul 23, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello:

    Has anyone seen the following error and what it might be caused by? This error happens occasionally and obviously looks like a database connection error. We are using ASP.net 1.1 and SQL 2K


    The connection is already Open (state=Open). Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: The connection is already Open (state=Open).
     
  2. are you ruining your quires in a try catch. If so do you close the connection in the catch?

    kevinasp.com
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    This error definitely means that your application is trying to open a connection when it is already opened.


    I recommend you add a test on the connection status before opening the connection, do something like this


    Dim objDBConn as SqlConnection
    if objDBConn.state <> connectionState.open Then
    objDBCOnn.open()
    End if




    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Bruce:

    I really appreciate your response.

    I am very encouraged by this forum thus far.

    Thanks again.

    Jim
     
  5. Thanks for the reply.


    I will check it out and see. I have seen the "Pooling connection error" before but not this one. It's happening on our sign in page that authenticates users.


    Thanks again,


    Jim
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page