Base solution for your next web application

Activities of "j.chow"

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。

Hi maliming,

when i change code to bellow, i will get a error msg in login. everythis is ok when revert to default.

Password is stored in clear text

login.js chaged to bellow

ref:https://github.com/aspnetzero/aspnet-zero-core/pull/2670

        abp.ui.setBusy(
            null,
            abp.ajax({
                contentType: app.consts.contentTypes.formUrlencoded,
                url: $loginForm.attr('action'),
                data: $loginForm.serialize()
            }).fail(function () {
                var isUseCaptcha = abp.setting.getBoolean("App.UserManagement.UseCaptchaOnLogin");
                
                if (isUseCaptcha) {
                    grecaptcha.reset();
                }
                //grecaptcha.reset();
            })
        );

hi maliming,

how can i change the url to the others.

on the other hand, how can I add judgment conditions to this code?

Hi maliming,

i think the login page is loaded successfully. is it because in china?

Hi Maliming,

thanks for your reply.

I think it is because reCaptcha is disabled in the settings

Showing 11 to 20 of 21 entries