This is a migrated thread and some comments may be shown as answers.

Trouble with a transport-level error

2 Answers 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Trevor
Top achievements
Rank 1
Trevor asked on 07 Jul 2011, 09:03 PM
I get the following error when trying to retrieve or insert data in the database.  Can't seem to make heads or tails of it.  Any idea what might be wrong?

An exception occured during the execution of '
Extent<MY_MODEL>.Where(s => s.Id.Equals(value(WebForm+<>c__DisplayClass0).my_model_instance.Id))'. See InnerException for more details.

STACKTRACE:

   at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
   at Telerik.OpenAccess.Query.ExpressionExecution.PerformDatabaseQuerySingle[TResult,T](Piece`1 piece, Int32& found, Int32 elemAt, Boolean single)
   at Telerik.OpenAccess.Query.ExpressionExecution.PerformQuerySingle[T,TResult](Piece`1 piece, Expression expression)
   at Telerik.OpenAccess.Query.Piece`1.System.Linq.IQueryProvider.Execute[TResult](Expression expr)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   at CitrixSessionLogger.ProcessRequest(HttpContext context) in c:\inetpub\wwwroot\vo\Web\WebServices\VOXA\CitrixSessionLogger.ashx:line 72

INNER EXCEPTION:

Error executing query: Telerik.OpenAccess.RT.sql.SQLException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The handle is invalid.)
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
SQL:
SELECT [AppName] AS COL1, [CitrixClientVersion] AS COL2, [ClientMachineName] AS COL3, [ClientOs] AS COL4, [LoginTime] AS COL5, [LogoutTime] AS COL6, [Username] AS COL7, [XenAppServerName] AS COL8 FROM [CitrixSessions] WHERE [SessionId] = ?                        Telerik.OpenAccess.RT.sql.SQLException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The handle is invalid.)
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()

STACKTRACE:

   at Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
   at Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
   at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.handleException(Exception x)
   at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.getObjectById(Object oid, Boolean validate)
   at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.GetObjectByKey(ObjectKey key)
   at OpenAccessRuntime.DataObjects.SynchronizedPMProxy.GetObjectByKey(ObjectKey key)
   at Telerik.OpenAccess.RT.ObjectScope.GetObjectByKey(ObjectKey key)
   at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid)
   at Telerik.OpenAccess.Query.ExpressionCompil

2 Answers, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 08 Jul 2011, 11:38 AM
Hi Trevor,

I guess that the connection to the database was terminated while reading the values for MY_MODEL.
Is that class wide (has long columns)? 
The exception is actually not produced by OpenAccess, but we are receiving it from the ADO driver  while reading. Which database are you using? Is the server remote (VPN)?

Kind regards,
Thomas
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Trevor
Top achievements
Rank 1
answered on 08 Jul 2011, 05:16 PM
I've tried the code on another web server, connecting to another database server, and it seems to work fine.  It must just be some mis-configuration of the first server.  Thanks for your help!
Tags
General Discussions
Asked by
Trevor
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Trevor
Top achievements
Rank 1
Share this question
or