Solution
This problem can be fixed applying synchronization around Data Service ObjectContext instance
Root Cause
This problem with Devart Data Driver that is not able to handle object connection request properly in multithreaded environment and tried to open an already open connection.
Error Stack Trace
References
http://forums.devart.com/viewtopic.php?t=22987
This problem can be fixed applying synchronization around Data Service ObjectContext instance
lock (MyObjectContext)
{
//Do your queries here
}
|
Root Cause
This problem with Devart Data Driver that is not able to handle object connection request properly in multithreaded environment and tried to open an already open connection.
Error Stack Trace
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code></code>
<message xml:lang="en-US">An error occurred while processing this
request.</message>
<innererror>
<message>The underlying provider failed on Open.</message>
<type>System.Data.EntityException</type>
<stacktrace>
at
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean
openCondition, DbConnection storeConnectionToOpen, DbConnection
originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
at
System.Data.EntityClient.EntityConnection.Open()
at
System.Data.Objects.ObjectContext.EnsureConnection()
at
System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
.... some private code
at
System.Data.Objects.ObjectContext.OnObjectMaterialized(Object entity)
at
System.Data.Common.Internal.Materialization.Shaper.RaiseMaterializedEvents()
at
System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at
System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription
description, IDataService dataService)
at
System.Data.Services.DataService`1.HandleRequest()
</stacktrace>
<internalexception>
<message>The connection was not closed.</message>
<type>System.InvalidOperationException</type>
<stacktrace>
at
Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at
Devart.Common.DbConnectionBase.Open()
at
Devart.Data.Oracle.OracleConnection.Open()
at
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean
openCondition, DbConnection storeConnectionToOpen, DbConnection
originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
</stacktrace>
</internalexception>
</innererror>
</error>
|
References
http://forums.devart.com/viewtopic.php?t=22987
No comments:
Post a Comment