Activities of "berkansasmaz"

Hello, I'm sorry that I can't recommend a workaround right now. It is caused by a plugin that we utilize, thus finding a workaround is far more difficult than tackling the problem itself. As a result, we will be releasing a new version of 'LeptonX' soon; unfortunately, I can only recommend that you wait for it. I believe you will accept it with grace.

Hi @rafael.gonzales,

Thanks for the additional information.

I did have the same exact questions about version selector but i think it's good to have an option to choose just in case you need an older version.

Unfortunately, I do not agree with this. We always recommend that the packages be of the same version, as there can be breaking changes between the two versions, that may prevent the application from working as expected. Therefore, by default, the version of the project and the version of the packages to be added must be the same.

The problem will be solved in the next patch version of 7.0.*. Here is the relevant PR.

First of all, thank you for the detailed information you provided.

I've looked into your issue. Here are my findings:

2 - Use ABP Suite, add the CmsKit Pro Module. The solution will not compile due to these errors about CmsKitProAdminBlazorServerModule and the namespace Volo.CmsKit.Pro.Admin.Blazor.Server.

I could not reproduce this problem, so no build errors occurred. Maybe you are encountering a temporary problem because the package cannot be restored. That's why I recommend you to build the project. In addition, Suite and ABP CLI must be the same as the version of the project you created. Could you please check them?

By the way, during the process of adding the module... there is a prompt in background (command line window) asking to scroll and choose the version of the CmsKit pro... Why I should pick the version ?!?! Is this a default behavior of NuGet ?!?!

I had this problem too. If I do not choose the version while installing the client-side packages, the Suite cannot progress and users may not be aware of this situation because it does not give any warnings. I will open an issue to improve this situation.

But, let's say I don't want or need the public web site project in my solution...but still want to use some features of the CmsKit... Let's say I just want to use the UrlShorting feature in my Blazor project... Why adding the CmsKit Pro module is not worlking if my inital project don't have the public web part ? Should it work anyway ? I think so...

Yes, it should work as expected. See more: https://docs.abp.io/en/commercial/latest/modules/cms-kit/index

Hi @FrancoisLabelle,

Sorry for the late reply. I will try to test it during the day and get back to you. Thank you for your understanding.

Hi, you seem to be registered with more than one organization, you can use the following command in such cases.

abp login YourEmailAddress -p YourPassword -o YourSelectedOrganizationName

Hi,

I don't think this issue is related to ABP. You can get it in ABP as in a normal ASP.NET application. Here are a few resources you can check out:

  1. https://github.com/abpframework/abp/blob/8236b83268228a8d1a2c1c90cc483b55c00a9d53/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/WebClientInfo/HttpContextWebClientInfoProvider.cs#L30-L41
  2. https://stackoverflow.com/questions/28664686/how-do-i-get-client-ip-address-in-asp-net-core

Hi,

I downloaded and tested a new project with version 5.3.4 but could not reproduce the problem.

You can check the YourProjectNameTenantDatabaseMigrationHandler service, and make sure it will be called when a tenant is created.

Its content should be as follows:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;

namespace MyCompanyName.MyProjectName.Data;

public class MyProjectNameTenantDatabaseMigrationHandler :
    IDistributedEventHandler<TenantCreatedEto>,
    IDistributedEventHandler<TenantConnectionStringUpdatedEto>,
    IDistributedEventHandler<ApplyDatabaseMigrationsEto>,
    ITransientDependency
{
    private readonly IEnumerable<IMyProjectNameDbSchemaMigrator> _dbSchemaMigrators;
    private readonly ICurrentTenant _currentTenant;
    private readonly IUnitOfWorkManager _unitOfWorkManager;
    private readonly IDataSeeder _dataSeeder;
    private readonly ITenantStore _tenantStore;
    private readonly ILogger<MyProjectNameTenantDatabaseMigrationHandler> _logger;

    public MyProjectNameTenantDatabaseMigrationHandler(
        IEnumerable<IMyProjectNameDbSchemaMigrator> dbSchemaMigrators,
        ICurrentTenant currentTenant,
        IUnitOfWorkManager unitOfWorkManager,
        IDataSeeder dataSeeder,
        ITenantStore tenantStore,
        ILogger<MyProjectNameTenantDatabaseMigrationHandler> logger)
    {
        _dbSchemaMigrators = dbSchemaMigrators;
        _currentTenant = currentTenant;
        _unitOfWorkManager = unitOfWorkManager;
        _dataSeeder = dataSeeder;
        _tenantStore = tenantStore;
        _logger = logger;
    }

    public async Task HandleEventAsync(TenantCreatedEto eventData)
    {
        await MigrateAndSeedForTenantAsync(
            eventData.Id,
            eventData.Properties.GetOrDefault("AdminEmail") ?? MyProjectNameConsts.AdminEmailDefaultValue,
            eventData.Properties.GetOrDefault("AdminPassword") ?? MyProjectNameConsts.AdminPasswordDefaultValue
        );
    }

    public async Task HandleEventAsync(TenantConnectionStringUpdatedEto eventData)
    {
        if (eventData.ConnectionStringName != ConnectionStrings.DefaultConnectionStringName ||
            eventData.NewValue.IsNullOrWhiteSpace())
        {
            return;
        }

        await MigrateAndSeedForTenantAsync(
            eventData.Id,
            MyProjectNameConsts.AdminEmailDefaultValue,
            MyProjectNameConsts.AdminPasswordDefaultValue
        );

        /* You may want to move your data from the old database to the new database!
         * It is up to you. If you don't make it, new database will be empty
         * (and tenant's admin password is reset to 1q2w3E*).
         */
    }

    public async Task HandleEventAsync(ApplyDatabaseMigrationsEto eventData)
    {
        if (eventData.TenantId == null)
        {
            return;
        }

        await MigrateAndSeedForTenantAsync(
            eventData.TenantId.Value,
            MyProjectNameConsts.AdminEmailDefaultValue,
            MyProjectNameConsts.AdminPasswordDefaultValue
        );
    }

    private async Task MigrateAndSeedForTenantAsync(
        Guid tenantId,
        string adminEmail,
        string adminPassword)
    {
        try
        {
            using (_currentTenant.Change(tenantId))
            {
                // Create database tables if needed
                using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: false))
                {
                    var tenantConfiguration = await _tenantStore.FindAsync(tenantId);
                    if (tenantConfiguration?.ConnectionStrings != null &&
                        !tenantConfiguration.ConnectionStrings.Default.IsNullOrWhiteSpace())
                    {
                        foreach (var migrator in _dbSchemaMigrators)
                        {
                            await migrator.MigrateAsync();
                        }
                    }

                    await uow.CompleteAsync();
                }

                // Seed data
                using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true))
                {
                    await _dataSeeder.SeedAsync(
                        new DataSeedContext(tenantId)
                            .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, adminEmail)
                            .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, adminPassword)
                    );

                    await uow.CompleteAsync();
                }
            }
        }
        catch (Exception ex)
        {
            _logger.LogException(ex);
        }
    }
}

Can you provide the following information:

  • Have you ever updated the ABP version of the project?
  • If you solved the problem, how did you solve it?
  • Is there a user belonging to the relevant tenant in the user table in the database?

Hello, I will try to answer your question as clearly as possible, please let me know if there is anything unclear.

First of all, you need to read this document.

A lot of things will fall into place after reading this document, but you may need code samples.

In this case, you can often look at the abpframework/eventhub project. Since it is an open-source sample, we did not use the Volo.Payment module there, but we wrote our own module very similarly. For simplicity, this module only supports PayPal as a gateway. For more information about the module you can check here.

Note: You don't need to write such a module because you can use the Volo.Payment module directly. I am giving information through the EventHub project just to give an example.

Now let's get to the usage and customization of this simple and logically almost the same module as Volo.Payment. You can get help from the codes here.

However, as I mentioned before, the codes are similar but may not be the same, so as I said before, you should read this document first of all.

Sorry, I think I expressed myself wrongly.

Corrected version :) 👇 3-) Generate with ABP Suite the MVC template(checked public website option)

Showing 71 to 80 of 332 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30