entity.EntityAspect.EntityManager.Principal.Identity.Name doesn't have values set in Login() call
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1312
Printed Date: 29-Apr-2025 at 4:48pm
Topic: entity.EntityAspect.EntityManager.Principal.Identity.Name doesn't have values set in Login() call
Posted By: dkearney1
Subject: entity.EntityAspect.EntityManager.Principal.Identity.Name doesn't have values set in Login() call
Date 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
|
Replies:
Posted By: kimj
Date 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.
|
Posted By: dkearney1
Date 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
|
|