New Posts New Posts RSS Feed: entity.EntityAspect.EntityManager.Principal.Identity.Name doesn't have values set in Login() call
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

entity.EntityAspect.EntityManager.Principal.Identity.Name doesn't have values set in Login() call

 Post Reply Post Reply
Author
dkearney1 View Drop Down
Newbie
Newbie
Avatar

Joined: 20-Jul-2007
Location: United States
Posts: 27
Post Options Post Options   Quote dkearney1 Quote  Post ReplyReply Direct Link To This Post Topic: entity.EntityAspect.EntityManager.Principal.Identity.Name doesn't have values set in Login() call
    Posted: 08-Jun-2009 at 7:27pm
I just upgraded from 4.2.1 to 5.1.0, and code that worked no longer appears to work.

In my Login() logic, after verifying the credentials, I returned using the following:
GenericIdentity identity = new GenericIdentity(credential.UserName, bu.Id.ToString("B")/* Guid of user record */);
return new GenericPrincipal(identity, null);

In the client code, I reliably had the Username in the Thread.CurrentPrincipal.Identity.Name, just as the doc says.

Now that I'm using the newest version, I get "Default Principal - #" (where # represents a monotonically increasing number) for the Identity.Name. I've reviewed the example supplied in Security_ConsoleUI, including creating the AppIdentity, but there's no change in behavior.

Any ideas?
Dan
“In anything at all, perfection is finally attained not when there is no
longer anything to add, but when there is no longer anything to take away.”
Saint-Exupéry
Wind, Sand, and Stars
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-Jun-2009 at 10:25pm
It sounds like your IEntityLoginManager is no longer being found, since the principal name you're seeing is what is returned by the default implementation.  I don't think we've changed the probing for this interface between these versions, but did have quite a few breaking changes in terms of namespace and assembly names.  Make sure that the top-level <probeAssemblyNames> element in the ideablade.configuration section contains the name of the assembly holding your class.  Also check the debuglog to see the early tracing information it produces - it will tell you where the config was loaded from, if it found an IEntityLoginManager, etc. and should help determine the problem here.
Back to Top
dkearney1 View Drop Down
Newbie
Newbie
Avatar

Joined: 20-Jul-2007
Location: United States
Posts: 27
Post Options Post Options   Quote dkearney1 Quote  Post ReplyReply Direct Link To This Post Posted: 09-Jun-2009 at 6:46am
You're correct, in updating the app.config I did not copy the old top-level probed assemblies over.

I appreciate the help, and thanks for the quick response.
Dan
“In anything at all, perfection is finally attained not when there is no
longer anything to add, but when there is no longer anything to take away.”
Saint-Exupéry
Wind, Sand, and Stars
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down