Print Page | Close Window

DataSourceKeys

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=1778
Printed Date: 21-Apr-2026 at 12:19pm


Topic: DataSourceKeys
Posted By: stephenmcd1
Subject: DataSourceKeys
Date Posted: 03-May-2010 at 5:43pm
Is the DataSourceKey functionality available in the current release of DevForce 2010?  My custom version of IDataSourceKeyResolver never seems to be passed the keyExtension parameter and anytime my silverlight app accesses an EntityService.svc file, it's never of the form EntityServer_Extension.svc/sl...it's always just EntityServer.svc/sl. 
 
I've looked through the help and it seems like the pertinent sections are either "Not Converted" or "Coming Soon".  This leads me to believe that this functionality might night have made the cut for the RC.  If that’s the case, when do you expect this functionality to be restored?



Replies:
Posted By: kimj
Date Posted: 03-May-2010 at 5:49pm
Unfortunately, there's a bug in DF 6.0.1 causing the data source extension not to be passed from Silverlight to the BOS, so the resolved EntityServer and service is always the default one.  This problem has been fixed in current bits and will be included in the next release.


Posted By: DavidKozikowski
Date Posted: 09-Jun-2010 at 6:16am
Originally posted by kimj

Unfortunately, there's a bug in DF 6.0.1 causing the data source extension not to be passed from Silverlight to the BOS, so the resolved EntityServer and service is always the default one.  This problem has been fixed in current bits and will be included in the next release.
 

Is this also why I’m getting errors when trying to access a second entity manager?

 

I’m in desperate need of being able to do this.



Posted By: kimj
Date Posted: 09-Jun-2010 at 7:23am

This particular problem affected only Silverlight when using data source extensions.  If that's your situation then it could be the cause of whatever error you're seeing.  The problem was fixed in 6.0.2.



Posted By: DavidKozikowski
Date Posted: 09-Jun-2010 at 7:28am

I’m using v 6.0.1 I cannot get an Entity manager to connect when using more than 1 database. It gives the below error:

IdeaBlade.EntityModel.EntityServerException was unhandled

  Message=Key 'GTDMENTITYMANAGER': Parameter 'connectionString' is not valid. String arguments cannot be empty.

Parameter name: connectionString A default IdeaBladeConfig is in use and does not contain either connectionStrings or EdmKeys. Ensure a valid configuration file containing connection information is present, or implement a custom IDataSourceKeyResolver.

 

Has anyone tested this in version 6.0.1?



Posted By: kimj
Date Posted: 09-Jun-2010 at 8:05am
Based on what you posted in another thread this is not a problem with data source extensions.  You mentioned in that other thread that you want to access one local database and one remote database.  To do that you can use two separate Entity Managers - one for the local DB and the other for the remote one.  There's a parameter called EntityServiceOption which you pass in the EM constructor to tell it whether it's going local or remote.  You can read more about it in the "Business Object Persistence - Advanced" chapter, but the signature looks like this:
 
public EntityManager(bool shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption);
 
Next problem, about the error message you're getting - First, it says that a default IdeaBladeconfig is in use; this means that either the ideablade.configuration section wasn't found in the config file or it was invalid.  When a default IdeaBladeConfig is in use  - which means DevForce built one up dynamically, the connection strings which may have been present are ignored.  (We do have an open bug report for this, but the problem is easily worked around.)   The debug log will have more information on the config file probing, so I would look at both the log and the config file next to see what's up.



Print Page | Close Window