New Posts New Posts RSS Feed: Datasource Extension issue
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Datasource Extension issue

 Post Reply Post Reply
Author
mitchell_bu View Drop Down
Newbie
Newbie


Joined: 23-Feb-2012
Posts: 10
Post Options Post Options   Quote mitchell_bu Quote  Post ReplyReply Direct Link To This Post Topic: Datasource Extension issue
    Posted: 07-Mar-2012 at 3:34pm

We just upgraded our application to 6.1.6.0 and we noticed a major issue.  We take advantage of being able to target different databases dynamically at log-in by defining a datasource extension in the DomainModelEntityManager constructor.  However, after upgrading, it seems as if the extension is being ignored when determing which database to connect to, with the first connection string in our config file always being used.  When debugging, before calling ConnectAsync on the EntityManager, I can see that the DataSourceExtension property is assigned correctly.  We also tried setting the new UseDefaultAuthenticationContext to false, with no effect.

 

Is this a bug or are we overlooking some breaking change??

 
 
UPDATE:
After digging into it a little more, it seems like it may be related to the IEntityLoginManager.  We implement this interface and in the Login method we use the EntityManager parameter that is passed in to create a new DomainModelEntityManager to verify login credentials.  However, the EntityManager that is getting passed in doesn't have the Datasource Extension property set.  I never had reason to get this deep in the code before, but since it worked up until now, I would have to assume that the property was getting passed correctly before 6.1.6.0.
Back to Top
mitchell_bu View Drop Down
Newbie
Newbie


Joined: 23-Feb-2012
Posts: 10
Post Options Post Options   Quote mitchell_bu Quote  Post ReplyReply Direct Link To This Post Posted: 08-Mar-2012 at 7:00am
Narrowed it down and it may be something we're doing wrong.
 
We've replaced our EntityManager.LoginAsync(credentials) call with Authenticator.Instance.LoginAsync(credentials) since the EntityManager methods are being deprecated.  The problem is that the Authenticator isn't aware of the Datasource Extension value.  Is there some initialization step we're missing?
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 08-Mar-2012 at 10:39am
Hi Mitchell,
 
The Authenticator Login and LoginAsync methods also accept a LoginOptions argument, which allows you to specify the data source extension, among other things.   The now deprecated EntityManager.Login methods actually pass LoginOptions based on the EntityManager settings along with its call to the Authenticator.  So that's also what you need to do  - not something you're doing wrong, just something we haven't documented well. 
 
Back to Top
mitchell_bu View Drop Down
Newbie
Newbie


Joined: 23-Feb-2012
Posts: 10
Post Options Post Options   Quote mitchell_bu Quote  Post ReplyReply Direct Link To This Post Posted: 08-Mar-2012 at 11:15am
Thanks Kim!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down