Trouble with a transport-level error

Thread is closed for posting
3 posts, 0 answers
  1. Trevor
    Trevor avatar
    11 posts
    Member since:
    Oct 2010

    Posted 07 Jul 2011 Link to this post

    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. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 08 Jul 2011 Link to this post

    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!

  3. Trevor
    Trevor avatar
    11 posts
    Member since:
    Oct 2010

    Posted 08 Jul 2011 Link to this post

    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!
Back to Top