473,378 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Linq-to-SQL random user errors.

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
0 2338

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Masoud Sharify | last post by:
does vc#2005 supports LINQ?(query in C# code)
3
by: jack | last post by:
Iv just heard of LINQ what is this all about
1
by: Chris | last post by:
I sort of asked this in my previous post but what is the status of linq? Is it in .net v3? Regards, Chris.
1
by: shapper | last post by:
Hello, I was using LINQ with VS 2008 Beta 2 and suddenly after installed VS2008 final version I get an error. My code is really simple: Dim database As New MyDbDataContext Dim tag = (From...
0
by: shapper | last post by:
Hello, I was using the following LINQ code in VS 2008 Beta 2: MyDbDataContext database = new CodeDataContext(); database.Tags.remove(tag); Now, with VS 2008 final release, I get an error on...
22
by: paululvinius | last post by:
Hi! Testing som Linq-expressions and tried to measure performance and compare it to pre-Linq programming. The folloing two methods are functional equal but the non-Linq one is twice as fast....
0
by: Deepak.Verma3441 | last post by:
LINQ Book Introducing Microsoft LINQ http://jumbooks.com/books/Computers%20and%20Internet/Introducing%20Microsoft%20Linq/
6
by: hon123456 | last post by:
Why does the compiler say that 'Linq' does not exist in the 'System' namespace when specifying a using statement as follows: using System.Linq; ----
5
by: Neil | last post by:
Hi group, is there a special C# LINQ group available? Regards
0
by: =?Utf-8?B?UmF5bmFsZA==?= | last post by:
Hi everybody, I have a problem on linq related field, look my simple example : <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.