Everything works great on our development server (vs2008 dev-webserver). However, when I put the app over on our staging server (Windows 2008 server, IIS7, Integrated Mode) we get a lot of ORM errors that never come to surface when running on our development machine... the ORM errors seem to be much less frequent when running in Classic (non-integrated) mode, but they do still appear from time to time.
I have a support ticket running for this issue but I wanted to see if other users are experiencing any of the following errors:
- SqlConnection does not support parallel transactions
InvalidOperationException: The connection is already closed.
- No active transaction.
Again, it seems like the errors are much more likely to happen when running in Integrated mode. Is anyone else experiencing these issues?
10 Answers, 1 is accepted
I am not running on IIS7 Intergrated Mode though I am running on an Windows 2003 IIS6 server with a SQL 2005 backend.
Any help in solving this would be greatly appreciated.
this indicates, that on the connection another activity was started and not finished properly. The offending code is _not_ the code you see on the stack, but something that for example started iterating a query result before and did not properly Dispose() the query result instance after being logically done with the result.
Please check your use of the query result instances, whether they are in a using or foreach statement.
I've put code in our runtime that will help to spot the real place where the Dispose() is likely to be missing; the next patch will have that change.
the Telerik team
We are getting this problem on a site using the latest OA version. Could you tell us what we are looking for to help us spot what is causing the "real" error?
My problem that I originally posted about really does appear to be my fault. The datascope module that I created was did not appear to be disposing the scope properly. Once I found the issue, and corrected it, I haven't had issues regarding this.
We are pretty sure there is something in our code that is causing this too but it is like looking for the proverbial needle in a haystack. Our issue only happens when the server is under load, so very hard to reproduce. And we are using a Sitefinity Module to do this and as far as we can work out there is only an initialize event and no event that runs at the end of each request so when to dispose of the scope without having to create a brand new scope everytime we do a query. We will no doubt have to raise a support request but I was wondering if there was an easy way of getting to where the problem is coming from.
Please if you are able to acquire any patterns of behavior and statistics regarding this problem, do share them with us. Even if it is caused by your implementation (if not something very specific), we would like to know how you use our product, and whether something in your pattern of use is problematic for OpenAccess ORM.
the Telerik team
Well the good news is we fixed the issue we were having the bad news was that we don't know exactly which if the changes we implemented or all fixed the issue.
Basically we firstly changed when our scope was initiallized to Autobegin transactions instead of us implicitly starting them ourselves.
Secondly we reduced the amount of times we use Flush() on the transaction as apparently this leave a scope transaction tied to an SQL one, I read that somewhere in your documentation.
And lastly we changed a few of our queried in our sitefinity data provider to assign the List to a variable returning it:
we changed to
And this then seemed to fix our problem. As I said though before we were only getting errors when the site was under a heavy load.
Maybe you could look and see if any of those items I change you could use to replicate the problem?
The pattern of the last thing you mentioned (the queries) is probably to resolve to differed disposing of the scope that is used by the query result. Also maybe the Flush reduction did it work... Well in all cases do keep us updated with any further problems you may experience, so that we pin-point the narrow place in our execution (if such is found). Thanks for the cooperation.
the Telerik team
I have been getting the same errors but then i realized that i had not updated the web config file with the required values
Please ensure that you put the following value