Page 1 of 1

Error Performing Query

Posted: Tue 27 Mar 2012 15:02
by pdc yaharasoftware
DataContext in Library, defined in a service contract and implemented in a self hosted WCF Service, running under Mono:

public IEnumerable GetBEDCOLORTYPEList()
{
using (MainContext.MainDataContext cx = new MainContext.MainDataContext(GetPath()))
{
IEnumerable result = (from s in cx.BEDCOLORTYPEs select s).ToList();
return result;
}
}

[ERROR] FATAL UNHANDLED EXCEPTION: Devart.Data.Linq.LinqCommandExecutionException: Error on opening DbConnection. ---> System.NotImplementedException: The requested feature is not implemented.
at Devart.Common.DbConnectionInternal.a (System.Transactions.Transaction A_0, Devart.Common.y A_1) [0x00000] in :0
at Devart.Common.DbConnectionInternal.EnlistToDistributedTransactionInternal (System.Transactions.Transaction transaction) [0x00000] in :0
at Devart.Common.DbConnectionInternal.EnlistToDistributedTransaction (System.Transactions.Transaction transaction) [0x00000] in :0
at Devart.Common.DbConnectionInternal.a () [0x00000] in :0
at Devart.Data.SQLite.ac.a () [0x00000] in :0
at Devart.Common.DbConnectionInternal.w () [0x00000] in :0
at Devart.Common.DbConnectionFactory.b (Devart.Common.DbConnectionBase A_0) [0x00000] in :0
--- End of inner exception stack trace ---

This query works executed directly from an EXE. I have not tried it from a library although a coworker has tested that and indicated it works.

Thoughts?

Some more information

Posted: Wed 28 Mar 2012 20:30
by pdc yaharasoftware
We switched to a paid version (bought the site license) and after running the Tools>License Information... which says I am good to go, I still get the error.

Posted: Thu 29 Mar 2012 12:05
by StanislavK
Could you please describe the scenario in more details? For example, do you explicitly open local and/or distributed transactions when retrieving data from the data context?

If possible, please send us a small sample with which the issue can be reproduced, so that we are able to analyze it in more details.

Posted: Thu 29 Mar 2012 12:58
by pdc yaharasoftware
Sample project sent.

Posted: Tue 03 Apr 2012 12:55
by pdc yaharasoftware
Any progress with my sample? Were you able to recreate the issue? Feedback is appreciated, if not expected.

Posted: Wed 04 Apr 2012 07:58
by MariiaI
Thank you for the sample project. We are investigating it now. We will notify you about the results as soon as possible.

Posted: Mon 09 Apr 2012 11:46
by StanislavK
We couldn't reproduce the issue in our environment. According to the stack trace, the problem occurs when trying to enlist the context connection to the distributed transaction. E.g., this may happen if you create a TransactionScope instance before using the context.

In either case, you can avoid such situations by changing the default connection behaviour (by default, a connection is always enlisted in the current distributed transaction). To do so, please set the 'Enlist' connection string parameter to false. Please tell us if this helps.

Posted: Mon 09 Apr 2012 13:04
by pdc yaharasoftware
In either case, you can avoid such situations by changing the default connection behaviour (by default, a connection is always enlisted in the current distributed transaction). To do so, please set the 'Enlist' connection string parameter to false. Please tell us if this helps.
In my case I was not explicitly using a transaction scope but it is possible that the WCF framework defaults to enlisting, although I do not know how it would be involved in that portion of the test.

At any rate, setting Enlist=false in the connection string resolved the issue; this works for me as Mono does not currently support it anyway (per the error.)

Thank you very much for your help!

Patrick