By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,142 Members | 1,946 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,142 IT Pros & Developers. It's quick & easy.

Linq-to-SQL random user errors.

P: n/a
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.Val idateConnectionForExecute(SqlCommand
command) at
System.Data.SqlClient.SqlConnection.ValidateConnec tionForExecute(String
method, SqlCommand command) at
System.Data.SqlClient.SqlCommand.ValidateCommand(S tring 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(Com mandBehavior behavior,
String method) at
System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior
behavior) at System.Data.Common.DbCommand.ExecuteReader() at
System.Data.Linq.SqlClient.SqlProvider.Execute(Exp ression 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(Obj ect instance,
MethodInfo methodInfo, Object[] parameters) at
System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
parameters) at
SystemLayer.FactoryView.DAL.Search.SearchControlle r.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.Ob jectReaderBase`1.GetColumnOrdinals(NamedColumn[]
namedColumns) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.Ob jectReaderBase`1..ctor(ObjectReaderSession`1
session, NamedColumn[] namedColumns, Object[] globals, Object[] arguments,
Int32 nLocals) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.Ob jectReaderSession`1.CreateReader[TObject](Func`2
fnMaterialize, NamedColumn[] namedColumns, Object[] globals, Int32 nLocals,
Boolean disposeDataReader) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.Ob jectReaderFactory`2.Create(DbDataReader
dataReader, Boolean disposeDataReader, IReaderProvider provider, Object[]
parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries) at
System.Data.Linq.SqlClient.SqlProvider.Execute(Exp ression 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(Obj ect instance,
MethodInfo methodInfo, Object[] parameters) at
System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
parameters) at
SystemLayer.FactoryView.DAL.Search.SearchControlle r.getFctysByFullTextFilter(String
filterArgs, String rowsPerPage, String rowsBeforeThisPage, Int32&
totalResultCount)
Aug 11 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.