New Posts New Posts RSS Feed: A Login Manager is required but was not found
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

A Login Manager is required but was not found

 Post Reply Post Reply
Author
cefernan View Drop Down
Groupie
Groupie


Joined: 13-Jul-2012
Posts: 70
Post Options Post Options   Quote cefernan Quote  Post ReplyReply Direct Link To This Post Topic: A Login Manager is required but was not found
    Posted: 15-Mar-2013 at 11:05am
Now, I need to discover why those assemblies are not being deployed :)
Back to Top
cefernan View Drop Down
Groupie
Groupie


Joined: 13-Jul-2012
Posts: 70
Post Options Post Options   Quote cefernan Quote  Post ReplyReply Direct Link To This Post Posted: 15-Mar-2013 at 10:16am
Kim,

I analysed the debug log and found out the problem. Some dependencies of DomainModel project were not published. I copied manually those files and now it is working fine.

Thank you so much.


Edited by cefernan - 15-Mar-2013 at 11:04am
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: 15-Mar-2013 at 8:24am
Also check that the assembly holding your LoginManager was deployed, and is being probed by DevForce.  The debug log generated by the EntityServer can tell you what assemblies were found.
Back to Top
cefernan View Drop Down
Groupie
Groupie


Joined: 13-Jul-2012
Posts: 70
Post Options Post Options   Quote cefernan Quote  Post ReplyReply Direct Link To This Post Posted: 14-Mar-2013 at 4:42pm
Hi Silvio,

I'm deploying publishing the project through WebDeploy in VS.

This is my LoginManager:
public class LoginManager : IEntityLoginManager
    {
        #region IEntityLoginManager Implementation
 
        public IPrincipal Login(ILoginCredential credential, EntityManager entityManager)               
        {            
            entityManager.VerifierEngine.ErrorsResourceManager = i18n.Localization.ErrorMessages.ResourceManager;
 
            if (credential == null)
                throw new LoginException(LoginExceptionType.NoCredentials, "Credentials are required.");
 
            if (string.IsNullOrWhiteSpace(credential.UserName))
                throw new LoginException(LoginExceptionType.InvalidUserName, "Username cannot be empty.");
 
            if (string.IsNullOrWhiteSpace(credential.Password))
                throw new LoginException(LoginExceptionType.InvalidPassword, "Password cannot be empty.");
 
            var em = new CrmallEntities(entityManager);
 
            var result = em.PersonUsers.Where(u => u.Login.ToUpper() == credential.UserName.ToUpper()
                                            && u.Password == credential.Password)
                                            .Include(f => f.Person)
                                            .Include(f => f.PersonUserProfile)
                                            .Include("PersonUserProfile.SysLanguage")
                                            .Include("PersonUserProfile.SysTimeZoneInfo")
                                            .Execute();
            PersonUser user = result.FirstOrDefault();
            if (user == null)
                throw new LoginException(LoginExceptionType.InvalidPassword, credential.Domain, credential.UserName);
 
            AppDateTime.Initialize();
 
            AuditManager.AuditLogon(em, user);
 
            return user;
        }
 
        public void Logout(IPrincipal principal, EntityManager entityManager)        
        {
            AuditManager.AuditLogoff(new CrmallEntities(entityManager), principal as PersonUser);
 
            entityManager.RejectChanges();
        }
}
Authentication on IIS is enabled just anonymous.

Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 14-Mar-2013 at 3:34pm
Hi cefernan,

We need additional information:

- How are you deploying your app? Are you copying the files manually or ensuring all files are properly updated?

- Can you provide your login manager?

- How have you set site authentication on IIS?

Back to Top
cefernan View Drop Down
Groupie
Groupie


Joined: 13-Jul-2012
Posts: 70
Post Options Post Options   Quote cefernan Quote  Post ReplyReply Direct Link To This Post Posted: 14-Mar-2013 at 1:44pm
My silverlight application is running with no problems in my machine. When I published to run in a server, this message appear when I try to login:
"A Login Manager is required but was not found"

This was working before but I didn't realize when started this problem.

Any idea?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down