Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "pmphillip"

Question

Hello everyone,

is there a complete example of LDAP authentication. I've read the documentation but I can't get it work. It will only authenticate against the mssql database. That's what I already did:

Created Authentication Source Class

class HagebauRzPortalLdapAuthenticationSource : LdapAuthenticationSource<Tenant, User>
    {
        public HagebauRzPortalLdapAuthenticationSource(ILdapSettings settings, IAbpZeroLdapModuleConfig ldapModuleConfig)
        : base(settings, ldapModuleConfig)
        {
           
        }
    }

Then I changed the core module file:

[DependsOn(typeof(AbpZeroCoreModule),typeof(AbpZeroLdapModule))]
    public class HagebauRzPortalCoreModule : AbpModule
    {
     
        public override void PreInitialize()
        {

            Configuration.Modules.ZeroLdap().Enable(typeof(HagebauRzPortalLdapAuthenticationSource));
          //Remove the following line to disable multi-tenancy.
          //Configuration.MultiTenancy.IsEnabled = false;

            //Add/remove localization sources here
            Configuration.Localization.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    HagebauRzPortalConsts.LocalizationSourceName,
                    new XmlEmbeddedFileLocalizationDictionaryProvider(
                        Assembly.GetExecutingAssembly(),
                        "PM.HagebauRzPortal.Localization.Source"
                        )
                    )
                );
           
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
            SettingManager settingsManager = IocManager.Resolve<SettingManager>();
            
            settingsManager.ChangeSettingForApplication("LdapSettingNames.IsEnabled", "true");

            
        }
    }

Now I get an exception telling me that there is no setting defined with property "LdapSettingNames.IsEnabled" :? What am I doing wrong? Any help would be greatly appreciated.

Best regards, Phillip

Showing 1 to 1 of 1 entries