Activities of "hussein"

you did answer: Exception message and full stack trace! i think it is a BUG

for the 2nd part, what you mean add new endpoint to return dto with deletion info?

  • ABP Framework version: v7.4.2 and v8.0.1
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): MVC
  • Exception message and full stack trace: There is no entity IdentityUser with id = 73d0adc8-6c63-ceeb-4b3a-3a103da86e3c!
  • Steps to reproduce the issue:
  • 1- create a new user
  • 2- delete the creator user
  • 3- edit the last created user the issue here is when you try to open the edit user modal, it try to get the user details (creator ) which have already been deleted and it will return an error message "There is no entity IdentityUser with id = 73d0adc8-6c63-ceeb-4b3a-3a103da86e3c!" as a temporary solution to fix this bug we should override the the following method to disable the IsoftDelete filter as the following

public override async Task<IdentityUserDto> GetAsync(Guid id) { using (DataFilter.Disable<ISoftDelete>()) return await base.GetAsync( id ); }

i have a question related to this if I want to display all the users in the table as admin, if I disabled the filter for ISoftDeleted, unfortunately, the IdentityUserDto doesn't return IsDeleted and deletionTime with return data, how to fix this?

public override async Task<PagedResultDto<IdentityUserDto>> GetListAsync(GetIdentityUsersInput input) { using (DataFilter.Disable<ISoftDelete>()) return await base.GetListAsync(input); }

sorry I don't have the privilege to send the project code,simpl just add a new table as below:

public class Person: FullAuditedAggregateRoot<Guid>, IMultiTenant
 {
     public virtual Guid? TenantId { get; set; }
     public virtual long PersonNo { get; set; }
     public virtual string Name { get; set; }
     public virtual bool IsCitizen { get; set; }
     [CanBeNull]
     public virtual string? NationalNo { get; set; }
     protected Person()
     {
     }
 }

the configuration in the dbcontext as below:

builder.Entity<Person>(b =>
{
    b.ToTable(BstCoreDbProperties.DbTablePrefix + "Persons", BstCoreDbProperties.DbSchema);
    b.ConfigureByConvention();
    b.Property(x => x.TenantId).HasColumnName(nameof(Person.TenantId));
    b.Property(x => x.Name).HasColumnName(nameof(Person.Name1)).IsRequired();
    b.HasIndex(x => new { x.TenantId, x.PersonNo }).IsUnique();
    b.HasIndex(x => new { x.TenantId, x.Name }).IsUnique();
    b.HasIndex(x => new { x.TenantId, x.NationalNo });//.IsUnique();
        b.Property(o => o.PersonNo)
         .HasDefaultValueSql("NEXT VALUE FOR PersonNo").ValueGeneratedOnAdd();
});
builder.HasSequence<long>("PersonNo").StartsAt(100000001).IncrementsBy(1);`

once you created this table, make a test to add two records with different tenant names, and check the generated sequence no (PersonNo) , it should be 100000001 for tenant#1, and 100000001 for tenant#2 but the output is 100000001 for tenant#1 and 100000002 for tenant#2

first thx for your replay, but it seems you didn't get my point, the application is multi-tenancy according to Abp.io's practice
so we have a tenant for each client (shared db), now we have the table name "Account", and we should create Sequences for this table in the field "AccountNo".

the above code will generate the same sequence for all clients, but it should be for each client(tenant) sequence

Hi,

What database are you using? ** SQL Server**

Note that the specific SQL used to generate a value from a sequence is database-specific; the above example works on SQL Server but will fail on other databases. Consult your specific database's documentation for more information.

See: https://learn.microsoft.com/en-us/ef/core/modeling/sequences#basic-usage

noting i use SQL server , my question here is there any way to achieve the required sequence per tenant?

  • ABP Framework version: v8.0.0-rc.2
  • UI Type: Angular / **MVC **/ Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

how we can create multiple sequences (One for each tenant)? for eaxample:

| Tenant |AccountNo | | --- | --- | | TenantA | 1000001 |customerX| | TenantA| 1000002 | customerX| | TenantB| 1000001 | customerX| | TenantB | 1000002 | CustomerX |

if we use the following code , it will generate a same sequence for all tenants b.Property(o => o.AccountNo) .HasDefaultValueSql("NEXT VALUE FOR AccountNo").ValueGeneratedOnAdd(); builder.HasSequence<long>("AccountNo").StartsAt(1000001).IncrementsBy(1);

Question
  • ABP Framework version: v8.0.0-rc.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: the abp suite not conute until completed task, i have checked the generated files and found error in the generated code as the following

using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace BstCore.EntityFrameworkCore;
[ConnectionStringName(BstCoreDbProperties.ConnectionStringName)]
public interface IBstCoreDbContext : IEfCoreDbContext
{
    DbSet<PersonTitle> PersonTitles { get; set; } **= null!;**  <-----compiler : the error in the generated code ,interface property cannot have an initializer

    DbSet<Neighborhood> Neighborhoods { get; set; } //= null!;
    DbSet<Town> Towns { get; set; }//= null!;
    DbSet<District> Districts { get; set; }// = null!;
    DbSet<Region> Regions { get; set; }//= null!;
    DbSet<Country> Countries { get; set; }// = null!;
    /* Add DbSet for each Aggregate Root here. Example:
     * DbSet<Question> Questions { get; }
     */
}

noting that no error in the abp suite log file! just waiting

public class PersonTitlesAppServiceTests : BstCoreApplicationTestBase
{
    private readonly IPersonTitlesAppService _personTitlesAppService;
    private readonly IRepository<PersonTitle, int> _personTitleRepository;
    public PersonTitlesAppServiceTests()
    {
        _personTitlesAppService = GetRequiredService<IPersonTitlesAppService>();
        _personTitleRepository = GetRequiredService<IRepository<PersonTitle, int>>();
    }
    [Fact]
    public async Task GetListAsync()
    {
        // Act
        var result = await _personTitlesAppService.GetListAsync(new GetPersonTitlesInput());`

it should be fixed as the following code

public abstract class PersonTitlesAppServiceTests&lt;TStartupModule&gt; : BstCoreApplicationTestBase&lt;TStartupModule&gt;
 where TStartupModule : IAbpModule
{}
  • Steps to reproduce the issue: adding new module to the project, try to generate entities
  • ABP Framework version: v8.0.0-rc.1
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I’ve updated my app to abp version 8.0.0-rc.1 But I got the following error: [12:28:49 ERR] ABP-LIC-0013 - License exception: ABP-LIC-0023: An error occured while calling the license server! License check communication failed! The response was not successful: 400 - Bad Request [12:28:49 ERR] ABP-LIC-0013 - License exception: ABP-LIC-0023: An error occured while calling the license server! License check communication failed! The response was not successful: 400 - Bad Request [12:28:49 INF] Saving healthchecks configuration to database [12:28:50 ERR] ABP-LIC-0013 - License exception: ABP-LIC-0023: An error occured while calling the license server! License check communication failed! The response was not successful: 400 - Bad Request [12:28:50 ERR] ABP-LIC-0013 - License exception: ABP-LIC-0023: An error occured while calling the license server! License check communication failed! The response was not successful: 400 - Bad Request [12:28:50 DBG] Waiting to acquire the distributed lock for saving external localizations... ABP-LIC-0003 - No modules found! There's no module found for your organization. Contact to license@abp.io for more information. [12:23:57 INF] User profile is available. Using 'C:\Users****\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. [12:23:57 ERR] ABP-LIC-0013 - License exception: ABP-LIC-0023: An error occured while calling the license server! License check communication failed! The response was not successful: 400 - Bad Request

i already have my current apps running since version 6 and last time i updated it from 7.3.0 to 7.4.0-rc.3 using using the command abp update cmd

<PackageReference Include="Volo.Abp.Autofac" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.Swashbuckle" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.FeatureManagement.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Web.OpenIddict" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.Account.Pro.Admin.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.AuditLogging.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.Identity.Pro.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.OpenIddict.Pro.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.LanguageManagement.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Saas.Host.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.TextTemplateManagement.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.Gdpr.Web" Version="7.4.0-rc.3" /> <PackageReference Include="Volo.Abp.LeptonTheme.Management.Web" Version="7.4.0-rc.3" />

for the details tab in edit user as i said, we already override the razor page, so this new tab didn't appear, i just want the razor page for the details to add it in our existing override page

Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include the following:

  • ABP Framework version: 7.4.0-rc.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

after i upgraded to v7.4.0-rc.3 , and published my apps, the app couldn't show the modal page for editing user or role permissions or personal data (all related to identity), the log file as the following

2023-09-20 10:23:51.108 +03:00 [ERR] An unhandled exception has occurred while executing the request. System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.HttpUtility, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. File name: 'System.Web.HttpUtility, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at AspNetCoreGeneratedDocument.Pages_AbpPermissionManagement_PermissionManagementModal.<ExecuteAsync>b__24_1() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at AspNetCoreGeneratedDocument.Pages_AbpPermissionManagement_PermissionManagementModal.<ExecuteAsync>b__24_1() at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(Boolean useCachedResult, HtmlEncoder encoder) at Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal.AbpModalTagHelperService.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AspNetCoreGeneratedDocument.Pages_AbpPermissionManagement_PermissionManagementModal.<ExecuteAsync>b__24_0() at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(Boolean useCachedResult, HtmlEncoder encoder) at Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AspNetCoreGeneratedDocument.Pages_AbpPermissionManagement_PermissionManagementModal.ExecuteAsync() at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable1 statusCode) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpOpenIddictMiddlewareExtension.<>c__DisplayClass0_0.<<UseAbpOpenIddictValidation>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) 2023-09-20 10:24:41.334 +03:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": { "ActivatorChain": "Pages.Gdpr.PersonalData.Index" }, "validationErrors": null } 2023-09-20 10:24:41.335 +03:00 [ERR] An exception was thrown while activating Pages.Gdpr.PersonalData.Index. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Pages.Gdpr.PersonalData.Index. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Pages.Gdpr.PersonalData.Index' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.Gdpr.IGdprRequestAppService gdprRequestAppService' of constructor 'Void .ctor(Volo.Abp.Gdpr.IGdprRequestAppService)'.

also,after upgrade i can't open the user edit modal, knowing that we override it and we noted in the newer version there is a new tab "Details" , could you give me the new tab razor page code

my current page as the following

<form method="post" asp-page="/Identity/Users/EditModal"> <abp-modal> <abp-modal-header style="width:130%" title="@L["Edit"].Value"></abp-modal-header> <abp-modal-body style="width:130%"> <abp-tabs name="create-user-modal-tabs"> .. </abp-tab> @if (Model.Roles.Any()) { <abp-tab name="Roles" title="@L.GetString("Roles{0}", Model.Roles.Count(r => r.IsAssigned))"> .. </abp-tab> } @if (Model.OrganizationUnits.Any()) { <abp-tab name="OrganizationUnits" title="@L.GetString("OrganizationUnits{0}", Model.OrganizationUnits.Count(r => r.IsAssigned))"> ... </abp-tab> } <abp-tab name="your-custom-tab" title="@L["ExtraProperties"].Value"> ... </abp-tab> <abp-tab name="SocialMedia-tab" title="@L["SocialMedia"].Value"> ... </abp-tab> </abp-tabs> </abp-modal-body> <abp-modal-footer style="width:130%" buttons="@(AbpModalButtons.Cancel | AbpModalButtons.Save)"></abp-modal-footer> </abp-modal> </form>

thanks in advance

Showing 1 to 10 of 32 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11