Activities of "berkansasmaz"

App.razor files are part of the UI Theme. Each time implements it according to their requirements. You can create a new App.razor in your project and use it.

But ABP Framework and Modules can't support Lazy Loading since they register their services into the dependency injection container and UI Components are resolved from ServiceProvider before rendering. So, that logic makes all of them replaceable from outside of the original assembly.

You can see this issue: https://github.com/abpframework/abp/issues/5543

But Blazorise supports it by default and you don't need to do any configuration. It loads required js and dll files when you use a component.


There is a useful article about it: https://community.abp.io/posts/prerendering-blazor-wasm-application-with-abp-6.x-2v8590g3

Hi,

If you want to override only LoginModel you can do it as below:

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(LoginModel))]
[DisableAuditing]
public class TappLoginModel : LoginModel
{

    public TappLoginModel(
        IAuthenticationSchemeProvider schemeProvider,
        IOptions<AbpAccountOptions> accountOptions,
        IAbpRecaptchaValidatorFactory recaptchaValidatorFactory,
        IAccountExternalProviderAppService accountExternalProviderAppService,
        ICurrentPrincipalAccessor currentPrincipalAccessor,
        IOptions<IdentityOptions> identityOptions,
        IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions) : base(
        schemeProvider,
        accountOptions,
        recaptchaValidatorFactory,
        accountExternalProviderAppService,
        currentPrincipalAccessor,
        identityOptions,
        reCaptchaOptions)
    {

    }

    public override Task<IActionResult> OnGetAsync()
    {
        return base.OnGetAsync();
    }


    [UnitOfWork] //TODO: Will be removed when we implement action filter
    public virtual async Task<IActionResult> OnPostAsync(string action)
    {
        try
        {
            await ReCaptchaVerification();
        }
        catch (UserFriendlyException e)
        {
            if (e is ScoreBelowThresholdException)
            {
                var onScoreBelowThresholdResult = OnRecaptchaScoreBelowThreshold();
                if (onScoreBelowThresholdResult != null)
                {
                    return await onScoreBelowThresholdResult;
                }
            }

            Alerts.Danger(GetLocalizeExceptionMessage(e));
            return Page();
        }

        ValidateModel();

        await IdentityOptions.SetAsync();

        var localLoginResult = await CheckLocalLoginAsync();
        if (localLoginResult != null)
        {
            return localLoginResult;
        }

        IsSelfRegistrationEnabled = await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled);

        await ReplaceEmailToUsernameOfInputIfNeeds();

        IsLinkLogin = await VerifyLinkTokenAsync();

        var result = await SignInManager.PasswordSignInAsync(
            LoginInput.UserNameOrEmailAddress,
            LoginInput.Password,
            LoginInput.RememberMe,
            true
        );

        await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
        {
            Identity = IdentitySecurityLogIdentityConsts.Identity,
            Action = result.ToIdentitySecurityLogAction(),
            UserName = LoginInput.UserNameOrEmailAddress
        });

        if (result.RequiresTwoFactor)
        {
            return RedirectToPage("./SendSecurityCode", new {
                returnUrl = ReturnUrl,
                returnUrlHash = ReturnUrlHash,
                rememberMe = LoginInput.RememberMe,
                linkUserId = LinkUserId,
                linkTenantId = LinkTenantId,
                linkToken = LinkToken
            });
        }


        if (result.IsLockedOut)
        {
            var lockedUser = await GetIdentityUser(LoginInput.UserNameOrEmailAddress);
            await StoreLockedUser(lockedUser);
            return RedirectToPage("./LockedOut", new {
                returnUrl = ReturnUrl,
                returnUrlHash = ReturnUrlHash
            });
        }

        if (result.IsNotAllowed)
        {
            var notAllowedUser = await GetIdentityUser(LoginInput.UserNameOrEmailAddress);

            if (!await UserManager.CheckPasswordAsync(notAllowedUser, LoginInput.Password))
            {
                Alerts.Danger(L["InvalidUserNameOrPassword"]);
                return Page();
            }

            if (notAllowedUser.ShouldChangePasswordOnNextLogin || await UserManager.ShouldPeriodicallyChangePasswordAsync(notAllowedUser))
            {
                await StoreChangePasswordUser(notAllowedUser);
                return RedirectToPage("./ChangePassword", new {
                    returnUrl = ReturnUrl,
                    returnUrlHash = ReturnUrlHash,
                    RememberMe = LoginInput.RememberMe
                });
            }

            if (notAllowedUser.IsActive)
            {
                await StoreConfirmUser(notAllowedUser);
                return RedirectToPage("./ConfirmUser", new {
                    returnUrl = ReturnUrl,
                    returnUrlHash = ReturnUrlHash
                });
            }

            Alerts.Danger(L["LoginIsNotAllowed"]);
            return Page();
        }

        if (!result.Succeeded)
        {
            Alerts.Danger(L["InvalidUserNameOrPassword"]);
            return Page();
        }

        var user = await GetIdentityUser(LoginInput.UserNameOrEmailAddress);

        if (IsLinkLogin)
        {
            using (CurrentPrincipalAccessor.Change(await SignInManager.CreateUserPrincipalAsync(user)))
            {
                await IdentityLinkUserAppService.LinkAsync(new LinkUserInput
                {
                    UserId = LinkUserId.Value,
                    TenantId = LinkTenantId,
                    Token = LinkToken
                });

                await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
                {
                    Identity = IdentitySecurityLogIdentityConsts.Identity,
                    Action = IdentityProSecurityLogActionConsts.LinkUser,
                    UserName = user.UserName,
                    ExtraProperties =
                        {
                            { IdentityProSecurityLogActionConsts.LinkTargetTenantId, LinkTenantId },
                            { IdentityProSecurityLogActionConsts.LinkTargetUserId, LinkUserId }
                        }
                });

                using (CurrentTenant.Change(LinkTenantId))
                {
                    var targetUser = await UserManager.GetByIdAsync(LinkUserId.Value);
                    using (CurrentPrincipalAccessor.Change(await SignInManager.CreateUserPrincipalAsync(targetUser)))
                    {
                        await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
                        {
                            Identity = IdentitySecurityLogIdentityConsts.Identity,
                            Action = IdentityProSecurityLogActionConsts.LinkUser,
                            UserName = targetUser.UserName,
                            ExtraProperties =
                                {
                                    { IdentityProSecurityLogActionConsts.LinkTargetTenantId, targetUser.TenantId },
                                    { IdentityProSecurityLogActionConsts.LinkTargetUserId, targetUser.Id }
                                }
                        });
                    }
                }

                return RedirectToPage("./LinkLogged", new {
                    returnUrl = ReturnUrl,
                    returnUrlHash = ReturnUrlHash,
                    targetLinkUserId = LinkUserId,
                    targetLinkTenantId = LinkTenantId
                });
            }
        }

        // Clear the dynamic claims cache.
        await IdentityDynamicClaimsPrincipalContributorCache.ClearAsync(user.Id, user.TenantId);

        return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash);
    }
}

Hello,

You cannot access the packages of ABP Pro modules from nuget.org. We have our own NuGet server due to some license validations.

Does the project you created have a NuGet.Config file? If so, can you check if the nuget.abp.io source has been added like below?

Hi,

Thanks for this feature request. I am opening an internal issue(internal repo issue number 19424) for this. We will review this feature and then if we see that it is necessary, it can be added in a short time. However, if it is not a must, we may not be able to spend time on it as a priority. Thank you for your understanding.

Hi,

Can you add the [DisableAuditing] attribute to the related entity? I think this restriction comes from the AuditLogging module.

https://abp.io/docs/latest/framework/infrastructure/audit-logging#enable-disable-for-entities-properties

Hi,

Sorry about the late reply.


I don't think we can solve the problem like this. If your problem still persists, we can schedule a meeting at a convenient time and look at it together. Is that okay with you?

Hi,

I created an application template with Angular UI from scratch but I didn't reproduce your problem.

If Impersonation permission is granted for the admin user, I can see the "Login with this tenant" button like above.


Can you also generate a new template from scratch? So, we can understand the problem is in ABP or your solution. If the problem is in your solution, we can only focus on your solution.

Opps! This suggestion worked for me at first, but it didn't work when I tried it again. Probably because I got a build on the last try, so I could see the problem. I apologize for the suggestion that didn't work.


As for your problem, I honestly can't find any other method. This is how Blazor Web App works and there is nothing to do about it. If you want it to render completely on the client side, you can use the Blazor Web Assembly template directly, but the first render time can take a long time. I know this situation is very annoying, but as I said, the problem is not caused by us, Blazor Web App works like this in itself.

I have changed as you advised and can fix the problem of loading menu but when open forms of the integrated modules it shown rendering error.

Oh, I see, yes, this render mode can cause such an error. Maybe we can make all components in App.Razor InteractiveAuto and pass the prerender parameter false like below. But then the user will not see anything until the Web Assembly side is loaded. This does not look good in terms of UX. However, there is nothing we can do in this case because Blazor UI works like this in itself. This is really annoying and I hope the .NET team will improve the working logic of Blazor.

     <ExampleComponent @rendermode="new InteractiveAutoRenderMode(prerender: false)" />

Hi,

Changing the router's render mode to interactive server fixes it, but don't you want to do that?

    <Routes @rendermode="InteractiveServer" /> // this line changed
Showing 261 to 270 of 737 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.