Print Page | Close Window

DataSource Extension and multiple data model dlls

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2118
Printed Date: 13-May-2026 at 12:56am


Topic: DataSource Extension and multiple data model dlls
Posted By: yafei
Subject: DataSource Extension and multiple data model dlls
Date Posted: 02-Sep-2010 at 12:34pm
I have a data model dll and an seperate admin data model dll. I always get errors when I try to implement DataSource extension.
 
ServerService.exe.config:
 
  <connectionStrings>
    <add name="VisitrackEntities_A1" connectionString="metadata=res://*/VisitTrack.csdl|res://*/VisitTrack.ssdl|res://*/VisitTrack.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=DEVSERVER\DEVSQL;Initial Catalog=Visitrack;User Id=localdev;Password=anotherhotday;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    <add name="FPServicesEntities_B" connectionString="metadata=res://*/FPServicesEDM.csdl|res://*/FPServicesEDM.ssdl|res://*/FPServicesEDM.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=DEVSERVER\DEVSQL;Initial Catalog=Visitrack;User Id=localdev;Password=anotherhotday;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
 
 
Errors:
IdeaBlade.EntityModel.EntityServerException was unhandled
  Message=Key 'FPSERVICESENTITIES': Key 'FPSERVICESENTITIES': The underlying provider failed on ConnectionString.
  Source=IdeaBlade.EntityModel
  Cancelled=false
  RemoteExceptionDetails=IdeaBlade.EntityModel.EntityServerException: Key 'FPSERVICESENTITIES': The underlying provider failed on ConnectionString. ---> System.Data.EntityException: The underlying provider failed on ConnectionString. ---> System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
   at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)
   at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
   at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
   at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
   at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value)
   at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
   at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
   --- End of inner exception stack trace ---
   at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
   at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
   at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
   at IdeaBlade.EntityModel.Edm.EdmKey.CreateContext()
   --- End of inner exception stack trace ---
   at IdeaBlade.EntityModel.Edm.EdmKey.CreateContext()
   at IdeaBlade.EntityModel.Edm.EdmKey.Initialize()
   at IdeaBlade.EntityModel.Edm.EdmKey.CreateContext()
  RemoteExceptionName=IdeaBlade.EntityModel.EntityServerException
  RemoteSource=IdeaBlade.EntityModel.Edm
  RemoteStackTrace=   at IdeaBlade.EntityModel.Edm.EdmKey.CreateContext()
   at IdeaBlade.EntityModel.Edm.EdmKey.Initialize()
   at IdeaBlade.EntityModel.Edm.EdmKey.CreateContext()
  StackTrace:
       at IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception pException, Boolean pTryToHandle, PersistenceOperation pOperation)
       at IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate entityQuery)
       at IdeaBlade.EntityModel.EntityManager.ExecuteFetch(IEntityFinder finder)
       at IdeaBlade.EntityModel.EntityQueryFinder.Execute()
       at IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync)
       at IdeaBlade.EntityModel.EntityManager.ExecuteQuery[T](IEntityQuery`1 query)
       at IdeaBlade.EntityModel.EntityQueryExtensions.Execute[T](IEntityQuery`1 query)
       at IdeaBlade.EntityModel.EntityQuery`1.GetEnumerator()
       at WpfApplication1.MainWindowViewModel.FirstSample() in C:\Docs\IdeaBlade\ProtoType\010_IntroToDevForce\HelloDevForce\WPF\HelloDevForce_BasicVersion\CodeCS\WpfApplication1\MainWindowViewModel.cs:line 105
       at WpfApplication1.MainWindowViewModel.Start() in C:\Docs\IdeaBlade\ProtoType\010_IntroToDevForce\HelloDevForce\WPF\HelloDevForce_BasicVersion\CodeCS\WpfApplication1\MainWindowViewModel.cs:line 57
       at WpfApplication1.MainWindow.MainWindow_Loaded(Object sender, RoutedEventArgs e) in C:\Docs\IdeaBlade\ProtoType\010_IntroToDevForce\HelloDevForce\WPF\HelloDevForce_BasicVersion\CodeCS\WpfApplication1\MainWindow.xaml.cs:line 44
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
       at MS.Internal.LoadedOrUnloadedOperation.DoWork()
       at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
       at System.Windows.Interop.HwndTarget.OnResize()
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Window.ShowHelper(Object booleanBox)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at WpfApplication1.App.Main() in C:\Docs\IdeaBlade\ProtoType\010_IntroToDevForce\HelloDevForce\WPF\HelloDevForce_BasicVersion\CodeCS\WpfApplication1\obj\x86\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:



Replies:
Posted By: yafei
Date Posted: 03-Sep-2010 at 3:33pm
After research and investigation, I find this is caused by the FPServicesEntities domain model. We created the FPServicesEntities model project by using old version of IdeaBlade (possibly 6.0.3). The domain model Visitrackentities is created by using 6.0.4. I got the error above, when I deploy them into the BOS (6.0.4) server. The problem goes away when I re-recreate the FPServicesEntities model using 6.0.4 and deploy to BOS server.
 
It looks there is a problem on version compatible upwards (downwards). 


Posted By: ting
Date Posted: 03-Sep-2010 at 4:43pm
Yes, the same version of DevForce should be used on the client and server.



Print Page | Close Window