Linq-to-SQL random user errors.

Discussion in 'ASP .Net' started by Hypercoder, Aug 11, 2008.

  1. Hypercoder

    Hypercoder Guest

    I'm encountering some strange behavior after deploying a ASP.net 3.5 website
    to production, i'm unable to reproduce these in my dev environment. This
    error seems to occur very randomly but it's occuring enough to be a real
    cause for concern. The errors occur a couple times a week and the website is
    hit with constant traffic 24x7. Below are the two errors that are
    encountered. I had read something about MARS causing errors like this but
    since LINQ-to-SQL is a black box in how it works with ADO.net this is proving
    to be difficult to troubleshoot, any help would be greatly appreciated.

    Error Messages:


    "There is already an open DataReader associated with this Command which must
    be closed first."

    stack trace:
    at
    System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand
    command) at
    System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String
    method, SqlCommand command) at
    System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean
    async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
    DbAsyncResult result) at
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior,
    String method) at
    System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
    behavior) at System.Data.Common.DbCommand.ExecuteReader() at
    System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo
    queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[]
    userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at
    System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query,
    QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments,
    ICompiledSubQuery[] subQueries) at
    System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression
    query) at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance,
    MethodInfo methodInfo, Object[] parameters) at
    System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
    parameters) at
    SystemLayer.FactoryView.DAL.Search.SearchController.getFctysByFullTextFilter(String
    filterArgs, String rowsPerPage, String rowsBeforeThisPage, Int32&
    totalResultCount)




    "Invalid attempt to call FieldCount when reader is closed."

    stack trace:
    at System.Data.SqlClient.SqlDataReader.get_FieldCount() at
    System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderBase`1.GetColumnOrdinals(NamedColumn[]
    namedColumns) at
    System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderBase`1..ctor(ObjectReaderSession`1
    session, NamedColumn[] namedColumns, Object[] globals, Object[] arguments,
    Int32 nLocals) at
    System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderSession`1.CreateReader[TObject](Func`2
    fnMaterialize, NamedColumn[] namedColumns, Object[] globals, Int32 nLocals,
    Boolean disposeDataReader) at
    System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderFactory`2.Create(DbDataReader
    dataReader, Boolean disposeDataReader, IReaderProvider provider, Object[]
    parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries) at
    System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo
    queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[]
    userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at
    System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query,
    QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments,
    ICompiledSubQuery[] subQueries) at
    System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression
    query) at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance,
    MethodInfo methodInfo, Object[] parameters) at
    System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
    parameters) at
    SystemLayer.FactoryView.DAL.Search.SearchController.getFctysByFullTextFilter(String
    filterArgs, String rowsPerPage, String rowsBeforeThisPage, Int32&
    totalResultCount)
    Hypercoder, Aug 11, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    913
    Mark Goldin
    Jan 17, 2004
  2. globalrev
    Replies:
    4
    Views:
    734
    Gabriel Genellina
    Apr 20, 2008
  3. Mike Gleason jr Couturier

    LINQ to SQL and new MS SQL 2008 datatypes

    Mike Gleason jr Couturier, Oct 28, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    293
    Cowboy \(Gregory A. Beamer\)
    Oct 29, 2008
  4. George

    Linq or not Linq

    George, Nov 4, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    335
    Mike Gleason jr Couturier
    Nov 5, 2008
  5. VK
    Replies:
    15
    Views:
    1,096
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page