Base solution for your next web application

Activities of "j.chow"

Thanks for your solution.

I have added following code into default.cshtml and top.cshtml

    @for (var i = 0; i < Model.Menu.Items.Count; i++)
    {
        var menuItem = Model.Menu.Items[i];
       *** if (!menuItem.IsVisible)
        {
            continue;
        }***
        @await Html.PartialAsync("Components/AppMenu/_UserMenuItem", new UserMenuItemViewModel
        {
            MenuItem = menuItem,
            MenuItemIndex = i,
            RootLevel = true,
            CurrentPageName = Model.CurrentPageName
        })
    }

Hi yekalkan,

Could you please give me more details to fix it.

develop environment Abp zero 7.2.3 Redtool 2.04 vs2017 win10 eng

Hi maliming,

ANSI encoding by default. All files generated with Redtool are also ANSI encoding.

hi maliming,

i just use red tools add a entity and add some code in appdbcontext.cs。

the MayHaveOrganizationUnit data filter is working correct.

but when i remove the express from CreateFilterExpression method and add SetFilterParameter method in entity application service, that is not working.

how can i share the code? need whiole solution?

product vesion:asp.net core mvc jquery 7.2.3

Hi maliming,

if i use red tools to add a OrganizationUnit's Navigation Properties, that mean is same as use IMustHaveOranizationUnit?

Hi maliming,

thank you for your support.

latest codeing:

file: AppLdapAuthenticationSource.cs public class AppLdapSettings : LdapSettings { protected new ISettingManager SettingManager { get; }

    public AppLdapSettings(ISettingManager settingManager) : base(settingManager)
    {
        SettingManager = settingManager;
    }

    public override async Task&lt;string&gt; GetPassword(int? tenantId)
    {
        if (tenantId.HasValue)
        {
            var ldapPassword = await SettingManager.GetSettingValueForTenantAsync(LdapSettingNames.Password, tenantId.Value);
            return SimpleStringCipher.Instance.Decrypt(ldapPassword);

        }
        else
        {
            var ldapPassword = await SettingManager.GetSettingValueForApplicationAsync(LdapSettingNames.Password);

            return SimpleStringCipher.Instance.Decrypt(ldapPassword);
        }
    }

}

file: XunyisoftSmartAppCoreModule.cs //Enable LDAP authentication (It can be enabled only if MultiTenancy is disabled!) IocManager.Register<ILdapSettings, AppLdapSettings>(); Configuration.Modules.ZeroLdap().Enable(typeof(AppLdapAuthenticationSource));

when i added 'Configuration.Modules.ZeroLdap().Enable(typeof(AppLdapSettings));' in PreInitialize method. i got new error message.

could you please give me sample code?

System.InvalidCastException: Unable to cast object of type 'XunyisoftSmartApp.Authorization.Ldap.AppLdapSettings' to type 'Abp.Authorization.Users.IExternalAuthenticationSource2[XunyisoftSmartApp.MultiTenancy.Tenant,XunyisoftSmartApp.Authorization.Users.User]'. at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver, Type type) in D:\Github\aspnetboilerplate\src\Abp\Dependency\IocResolverExtensions.cs:line 30 at Abp.Authorization.AbpLogInManager3.TryLoginFromExternalAuthenticationSources(String userNameOrEmailAddress, String plainPassword, TTenant tenant) in D:\Github\aspnetboilerplate\src\Abp.ZeroCore\Authorization\AbpLoginManager.cs:line 289 at Abp.Authorization.AbpLogInManager3.LoginAsyncInternal(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout) in D:\Github\aspnetboilerplate\src\Abp.ZeroCore\Authorization\AbpLoginManager.cs:line 170 at Abp.Authorization.AbpLogInManager3.LoginAsync(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout) at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task1 actualReturnValue, Func1 postAction, Action1 finalAction) at XunyisoftSmartApp.Web.Controllers.AccountController.GetLoginResultAsync(String usernameOrEmailAddress, String password, String tenancyName) in C:\Users\Me\Documents\Projects\XunyisoftSmartApp722\src\XunyisoftSmartApp.Web.Mvc\Controllers\AccountController.cs:line 249 at XunyisoftSmartApp.Web.Controllers.AccountController.Login(LoginViewModel loginModel, String returnUrl, String returnUrlHash, String ss) in C:\Users\Me\Documents\Projects\XunyisoftSmartApp722\src\XunyisoftSmartApp.Web.Mvc\Controllers\AccountController.cs:line 174 at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task1 actualReturnValue, Func1 postAction, Action1 finalAction) at lambda_method(Closure , Object ) at ...

Hi maliming,

i had try to override the getpassword method, but it is not working. what is something wrong or missing in coding. thanks

System.DirectoryServices.DirectoryServicesCOMException (0x8007052E): user name or password not right。

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer() at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize() at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable1 identityType, String identityValue, DateTime refDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue) at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, String identityValue) at Abp.Zero.Ldap.Authentication.LdapAuthenticationSource2.UpdateUserAsync(TUser user, TTenant tenant) at Abp.Authorization.AbpLogInManager3.TryLoginFromExternalAuthenticationSources(String userNameOrEmailAddress, String plainPassword, TTenant tenant) at Abp.Authorization.AbpLogInManager3.LoginAsyncInternal(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout) at Abp.Authorization.AbpLogInManager3.LoginAsync(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout) at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task1 actualReturnValue, Func1 postAction, Action1 finalAction) at XunyisoftSmartApp.Web.Controllers.AccountController.GetLoginResultAsync(String usernameOrEmailAddress, String password, String tenancyName) in C:\Users\Me\Documents\Projects\XunyisoftSmartApp722... System.DirectoryServices.DirectoryServicesCOMException (0x8007052E): user name or password not right。

Showing 1 to 10 of 15 entries