Error by GetManager in ObjectContextManager

Error by GetManager in ObjectContextManager

Old forum URL: forums.lhotka.net/forums/t/8887.aspx


lprada posted on Wednesday, May 05, 2010

I have this error, any ideas?

Exception has been thrown by the target of an invocation.

   at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)

   at System.RuntimeMethodHandle.InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct signature, RuntimeType declaringType)

   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)

   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)

   at System.Activator.CreateInstance(Type type, Object[] args)

   at Csla.Data.ObjectContextManager`1..ctor(String connectionString, String label) in C:\DATA\LCP\Projects\Tools\CSLA\cslacs-3.7.0-090721\cslacs\Csla\Data\ObjectContextManager.cs:line 134

   at Csla.Data.ObjectContextManager`1.GetManager(String database, Boolean isDatabaseName, String label) in C:\DATA\LCP\Projects\Tools\CSLA\cslacs-3.7.0-090721\cslacs\Csla\Data\ObjectContextManager.cs:line 121

   at Csla.Data.ObjectContextManager`1.GetManager(String database, Boolean isDatabaseName) in C:\DATA\LCP\Projects\Tools\CSLA\cslacs-3.7.0-090721\cslacs\Csla\Data\ObjectContextManager.cs:line 79

   at Csla.Data.ObjectContextManager`1.GetManager(String database) in C:\DATA\LCP\Projects\Tools\CSLA\cslacs-3.7.0-090721\cslacs\Csla\Data\ObjectContextManager.cs:line 47

   at LCP.ScanLite.Dal.EntityFramework.DalHelper.GetObjectContextManager() in E:\DATA\Personales\HG\LCPScanLite-Trunk\LCP.ScanLite\LCP.ScanLite.Dal.EntityFramework\DalHelper.cs:line 20

   at LCP.ScanLite.Dal.EntityFramework.LCPScanLiteDalRepository.GetEmpresa() in E:\DATA\Personales\HG\LCPScanLite-Trunk\LCP.ScanLite\LCP.ScanLite.Dal.EntityFramework\LCPScanLiteDalRepository.cs:line 43

   at LCP.ScanLite.WindowsWPF.MainWindow.XamRibbonWindow_Loaded(Object sender, RoutedEventArgs e) in E:\DATA\Personales\HG\LCPScanLite-Trunk\LCP.ScanLite\LCP.ScanLite.WindowsWPF\MainWindow.xaml.cs:line 129

RockfordLhotka replied on Thursday, May 06, 2010

The ObjectContextManager is trying to create an instance of your EF context object, and that's failing. Sadly the exception doesn't say why it is unable to create an instance of the EF context object - so you'll probably need to try to manually create one yourself to see why it is failing.

lprada replied on Friday, May 07, 2010

I will test it and let everyone knows the results

espenrl replied on Saturday, June 26, 2010

I have experienced the same problem today. I got the exception message {"Keyword not supported: 'data source'."} and this is a problem connected to the database connection string.

 It appears to have a relation to the fact that I am using the ADO.NET Entity Framework for data access. The connection string I used was a valid ADO.NET connection string - but was NOT a valid Entity Framework connection string.

http://stackoverflow.com/questions/1404268/keyword-not-supported-data-source

Copyright (c) Marimer LLC