Learn More, Pay Less!
Limited Time Offer!

Activities of "liangshiwei"

Thanks. I will check it out.

HI,

Can you provide steps to reproduce?

Hi,

In appUser case, you need change the YourDbContextModelCreatingExtensions alfter suite added navigation properties.

  1. Remove b.HasOne<AppUser>().WithMany().HasForeignKey(x => x.AppUserId); in YourDbContextModelCreatingExtensions.
  2. Open *MigrationsDbContext, add the following code in the OnModelCreating method:
builder.Entity<MyExistingEntity>(b =>
{
    b.Ignore(x => x.AppUser);
    
    b.HasOne<IdentityUser>().WithMany().HasForeignKey(nameof(MyExistingEntity.AppUserId)).IsRequired(false);
});

builder.Entity<IdentityUser>(b =>
{
    b.Property<Guid?>(nameof(AppUser.MyExistingEntityId));
    b.HasOne<MyExistingEntity>().WithMany().HasForeignKey(nameof(AppUser.MyExistingEntityId));
});
  1. Open *DbContext, add the following code in the OnModelCreating method:
builder.Entity<AppUser>(b =>
{
    b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser

    b.ConfigureByConvention();
    b.ConfigureAbpUser();

    /* Configure mappings for your additional properties
     * Also see the CustomApplicationModulesEfCoreEntityExtensionMappings class
     */

    b.Property<Guid?>(nameof(AppUser.MyExistingEntityId));
    b.HasOne<MyExistingEntity>().WithMany().HasForeignKey(nameof(AppUser.MyExistingEntityId));
});

/* Configure your own tables/entities inside the ConfigureCustomApplicationModules method */

builder.ConfigureCustomApplicationModules();

builder.Entity<MyExistingEntity>(b =>
{
    //SET RELATIONS FOR THE PROJECT DBCONTEXT

    b.HasOne(x => x.AppUser).WithMany().HasForeignKey(nameof(MyExistingEntity.AppUserId)).IsRequired(false);
});

Re-create migration files.

Could not find file '/Themes/Lepton/Global/Styles/lepton1.css'

Hi, Maybe you can try to add this file to your project manually.

First with unauthorize access (401) to the hangfire UI

Maybe you added some hangfire auth filter, you should check the code.

Hi,

We have fixed the problem in 4.4.0. For now, try:

appsettings

{
  ......
  "RemoteServices": {
    "Default": {
      "BaseUrl": "https://localhost:44301/"
    },
    "<YourProjectName>": {
      "BaseUrl": "https://localhost:44300/"
    }
  },
  "AbpCli": {
    "Bundle": {
      "Mode": "BundleAndMinify",
      /* Options: None, Bundle, BundleAndMinify */
      "Name": "global",
      "Parameters": {
        "LeptonTheme.Style": "Style1",
        /* Options: Style1, Style2... Style6 */
        "LeptonTheme.ChangeStyleDynamically": "true"
      }
    }
  }
}

index.html

*HostMenuContributor

public class <YourProjectName>HostMenuContributor : IMenuContributor
{
    private readonly IConfiguration _configuration;

    public <YourProjectName>HostMenuContributor(IConfiguration configuration)
    {
        _configuration = configuration;
    }

    public async Task ConfigureMenuAsync(MenuConfigurationContext context)
    {
        if (context.Menu.Name == StandardMenus.User)
        {
            await ConfigureUserMenuAsync(context);
        }
    }

    private Task ConfigureUserMenuAsync(MenuConfigurationContext context)
    {
        var accountStringLocalizer = context.GetLocalizer<AccountResource>();

        var identityServerUrl = _configuration["AuthServer:Authority"] ?? "";

        context.Menu.AddItem(new ApplicationMenuItem(
            "Account.Manage",
            accountStringLocalizer["ManageYourProfile"],
            $"{identityServerUrl.EnsureEndsWith('/')}Account/Manage?returnUrl={_configuration["App:SelfUrl"]}",
            icon: "fa fa-cog",
            order: 1000,
            null).RequireAuthenticated());

        return Task.CompletedTask;
    }
}

*BlazorHostModule

[DependsOn(
    typeof(AbpAutofacWebAssemblyModule),
    typeof(AbpAspNetCoreComponentsWebAssemblyLeptonThemeModule),
    typeof(LeptonThemeManagementBlazorWebAssemblyModule),
    typeof(AbpIdentityProBlazorWebAssemblyModule),
    typeof(AbpAccountAdminBlazorWebAssemblyModule),
    typeof(AbpIdentityServerBlazorWebAssemblyModule),
    typeof(AbpAuditLoggingBlazorWebAssemblyModule),
    typeof(TextTemplateManagementBlazorWebAssemblyModule),
    typeof(LanguageManagementBlazorWebAssemblyModule),
    typeof(SaasHostBlazorWebAssemblyModule),
    typeof(AbpSettingManagementBlazorWebAssemblyModule),
    typeof(<YourProjectName>BlazorModule)
)]
public class <YourProjectName>BlazorHostModule : AbpModule

*IdentityServerModule

[DependsOn(
    typeof(AbpAccountPublicWebIdentityServerModule),
    typeof(AbpAccountPublicApplicationModule),
    typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
    typeof(AbpAspNetCoreMvcModule),
    typeof(AbpAspNetCoreMvcUiLeptonThemeModule),
    typeof(AbpAuditLoggingEntityFrameworkCoreModule),
    typeof(AbpAutofacModule),
    typeof(AbpCachingStackExchangeRedisModule),
    typeof(AbpEntityFrameworkCoreSqlServerModule),
    typeof(AbpIdentityProEntityFrameworkCoreModule),
    typeof(AbpIdentityApplicationModule),
    typeof(AbpIdentityHttpApiModule),
    typeof(AbpIdentityServerEntityFrameworkCoreModule),
    typeof(LeptonThemeManagementHttpApiModule),
    typeof(LeptonThemeManagementApplicationModule),
    typeof(LeptonThemeManagementDomainModule),
    typeof(AbpPermissionManagementDomainIdentityModule),
    typeof(AbpPermissionManagementEntityFrameworkCoreModule),
    typeof(AbpPermissionManagementApplicationModule),
    typeof(AbpPermissionManagementHttpApiModule),
    typeof(AbpSettingManagementEntityFrameworkCoreModule),
    typeof(AbpSettingManagementApplicationModule),
    typeof(AbpSettingManagementHttpApiModule),
    typeof(AbpSettingManagementEntityFrameworkCoreModule),
    typeof(AbpFeatureManagementHttpApiModule),
    typeof(AbpFeatureManagementApplicationModule),
    typeof(AbpFeatureManagementEntityFrameworkCoreModule),
    typeof(SaasEntityFrameworkCoreModule),
    typeof(SaasHostApplicationModule),
    typeof(SaasHostHttpApiModule),
    typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
    typeof(BlobStoringDatabaseEntityFrameworkCoreModule),
    typeof(<YourProjectName>ApplicationContractsModule),
    typeof(AbpSwashbuckleModule),
    typeof(AbpAspNetCoreSerilogModule)
    )]
public class <YourProjectName>IdentityServerModule : AbpModule

Then run abp bundle command in the blazor folder to update resource references.

Hi,

Open *.EntityFrameworkCoreModule and find Configure<AbpDbContextOptions>:

Configure<AbpDbContextOptions>(options =>
{
    /* The main point to change your DBMS.
     * See also MyProjectNameMigrationsDbContextFactory for EF Core tooling. */
    options.UseSqlServer();

    options.Configure(c =>
    {
        c.DbContextOptions.UseTriggers();
    });
});

Hi,

Did you try dotnet clean?

See https://github.com/abpframework/abp-samples/blob/abd1a864f273523640853362581c65cb85f5ac5b/DomainTenantResolver/MVC-TIERED/src/Acme.BookStore.Web/BookStoreWebModule.cs#L162

Answer

Hi,

Use HTTP will get some problems,we don't recommend using HTTP. HTTPS is best way.

If you still use HTTP, please refer: https://community.abp.io/articles/patch-for-chrome-login-issue-identityserver4-samesite-cookie-problem-weypwp3n

Hi,

Are you using tiered architecture? if not, you just need configure auto api controllers for public project.

private void ConfigureAutoApiControllers()
{
    Configure<AbpAspNetCoreMvcOptions>(options =>
    {
        options.ConventionalControllers.Create(typeof(MyProjectNameApplicationModule).Assembly);
    });
}

If you are using tiered architecture, you can create a controller to call appservice, e.g:

public class ProductController : MyProjectNameController
{
    private readonly IProductAppService _productAppService;

    public ProductController(IProductAppService productAppService)
    {
        _productAppService = productAppService;
    }

    public async Task<IActionResult> GetListAsync()
    {
        return Json(await _productAppService.GetListAsync())
    }
}
Showing 5731 to 5740 of 6574 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on February 17, 2025, 05:40