Connection Open Error

Posts   
 
    
Posts: 94
Joined: 23-Aug-2006
# Posted on: 25-Mar-2015 18:03:32   

My team is seeing an error that cannot be reproduced in Visual Studio in debug mode. Whenever we have multiple browsers (users) interacting with the application we see sporadic cases of "Not allowed to change the 'ConnectionString' property. The connection's current state is open"

Is there a config setting that I can use to get more information from llblgen when it encounters this problem.

I'm a little stumped because we have always followed the same pattern of calling Adapter with using{} to make sure it gets cleared when the call goes out of scope.

Its a bit of a long-shot since this is not an llblgen defect, rather a runtime issue. But if anyone has seen similar problems I would love to hear.

Thanks Thomas

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 25-Mar-2015 18:43:58   

Since it happens in Debug mode, could you please provide a stack trace? You don't share the adapter instance among threads, do you?

Posts: 94
Joined: 23-Aug-2006
# Posted on: 25-Mar-2015 18:46:51   

Sorry it doesnt happen in debug. Only at runtime.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 25-Mar-2015 18:53:14   

My bad. . 2nd question is still valid, do you share the adapter between threads?

Another question: Is the 'ConnectionString' set/change programmatically?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 26-Mar-2015 09:43:27   

the stacktrace to the error (even in release build) should tell you indeed where things are shared, it looks like an adapter isn't properly used but shared among threads/requests

Frans Bouma | Lead developer LLBLGen Pro
Posts: 94
Joined: 23-Aug-2006
# Posted on: 26-Mar-2015 14:16:48   

We can close this. Turns out it has nothing to do with llblgen. After dissecting the stack trace we found it was an unrelated data access call (serviceStack / ORMLite)

Thank you !