Activities of "roberto.fiocchi"

Having received no response to the posts and emails sent, I open a dedicated ticket. See my post https://abp.io/qa/questions/3052/3a18165e-11ab-1b69-892b-659fe71558de

Using Blazor Wasm (abp 8.3.2) I need to implement the real-time notification system already present in AspNetZero

I already read https://abp.io/docs/latest/framework/real-time/signalr, but it is not specific to Blazor WASM I already read https://learn.microsoft.com/en-us/aspnet/core/blazor/tutorials/signalr-blazor?view=aspnetcore-8.0&tabs=visual-studio and I tried to implement it but I have problems both with the Hub management and with the use of reusable Blazor components inside the Lepton-x toolbar (https://abp.io/support/questions/8800/Double-Initialization-of-Custom-Toolbar-Component)

Can you give me some information on when this feature will be available? Or can you guide me step by step to implement this service?

Thanks Roberto

  • ABP Framework version: v8.3.2
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Steps to reproduce the issue:
  1. Creating an ABP solution (v.8.3.2 Blazor WASM)
  2. Follow the guide: https://abp.io/docs/latest/framework/ui/blazor/toolbars#example-add-a-notification-icon to create a component and add it to the toolbar.

Dear Support Team,

I am working on an ABP project using version 8.3.2 with a Blazor WASM frontend. I followed your guide to customize the toolbar and add my own component Specifically, I created a class implementing IToolbarContributor, added my component to toolbar.Items, and configured the toolbar in BlazorClientModule.

However, I have noticed that the initialization of the component inside the toolbar is executed twice.

Could you help me understand why this is happening? Is this a bug?

The double initialization is problematic for me because, during initialization, I need to make server calls, register events, and attach to a SignalR hub, among other things. The duplicate initialization is causing unexpected issues.

Thank you for your support.

Best regards, Roberto

  • ABP Framework version: v8.3.2
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

Hi, I have an ABP 8.3.2 blazor wasm solution. I need to implement some additional logic when a user signs out or when a user exits the application. What is the best way to implement such logic using the ABP Framework?

  • ABP Framework version: v8.2.1
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular):
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Good morning,

I have a Blazor WASM project where I inserted a custom component in the toolbar, following this guide from the doc: https://abp.io/docs/latest/framework/ui/blazor/toolbars#example-add-a-notification-icon

The content of my custom component must be visible only after logging in and with a specific permission, because I need to make API calls when initializing the component, so I need to manage authentication and authorization. To do this I managed everything using the tag "AuthorizeView" (with Policy parameter as explained in the doc) and in the .razor.cs using the "CurrentUser.IsAuthenticated" and the "AuthorizationService.IsGrantedAsync...." inside the "OnInitializedAsync" method. My component code is as follows:

@using AbpSolution1.Books
@using AbpSolution1.Permissions
@using Microsoft.AspNetCore.Authorization
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase
@inject IBooksAppService BooksAppService

@* https://abp.io/docs/latest/framework/ui/blazor/authorization *@
<AuthorizeView Policy="@AbpSolution1Permissions.Books.Default">
    <Authorized>
        @if (IsAnyBook)
        {
            <div class="bg-success w-100 d-flex justify-content-center align-items-center h-100">
                <b class="text-dark" style="font-size: 20px;">
                    Books available
                </b>
            </div>
        }
        else
        {
            <div class="bg-warning w-100 d-flex justify-content-center align-items-center h-100">
                <b class="text-dark" style="font-size: 20px;">
                    No Books
                </b>
            </div>
        }
    </Authorized>
    <NotAuthorized>
        <div class="bg-danger w-100 d-flex justify-content-center align-items-center h-100">
            <b class="text-dark" style="font-size: 20px;">
                Not Authorized
            </b>
        </div>
    </NotAuthorized>
</AuthorizeView>

@code {

    private bool IsAnyBook { get; set; } = false;

    private async Task LoadBooks()
    {
        try
        {
            GetBooksInput input = new GetBooksInput();
            var books = await BooksAppService.GetListAsync(input);
            IsAnyBook = books.Items.Any();
        }
        catch(Exception ex)
        {
            await HandleErrorAsync(ex);
            Console.WriteLine(ex.Message);
        }
    }

    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();
        var isAutheticated = CurrentUser.IsAuthenticated;
        var isAuthorized = await AuthorizationService.IsGrantedAsync(AbpSolution1Permissions.Books.Default);

        if (isAutheticated && isAuthorized)
        {
            await LoadBooks();
        }
    }
}

However, when I log in and the component is rendered I get a 401 "Unauthorized" error, even if the logged in user has permission to make the call. It would appear that the call is made before obtaining the token.

How can I solve it? (if necessary we can attach the entire zipped project)

Thank you, best regards

Roberto

  • ABP Framework version: v8.2.0-rc.5
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: none

Hi, We have already customized the account module (its the only module of which we can download the source code) but we found ourselves needing to implement something similar to the new sessions system found in the identity module. Since both module are correlated and work closely with each other wouldn't it be useful to be able to download the source code of the identity module aswell?

  • ABP Framework version: v8.2.0-rc.1
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: none
  • Steps to reproduce the issue: 1 Create a new abp blazor wasm solution. 2 Create the following entity "Book" using Abp Suite:
public class Book : AuditedEntity<int>, IHasConcurrencyStamp
{
    [NotNull]
    public virtual string Title { get; set; }
    public virtual int Pages { get; set; }

    public virtual DateOnly? PublishDate { get; set; }

    public string ConcurrencyStamp { get; set; }

    protected Book()
    {

    }

    public Book(string title, int pages, DateOnly? publishDate = null)
    {
        ConcurrencyStamp = Guid.NewGuid().ToString("N");

        Check.NotNull(title, nameof(title));
        Title = title;
        Pages = pages;
        PublishDate = publishDate;
    }

}

3 Add the data annotations so it would audit only the "PublishDate" property as by the documentation (https://docs.abp.io/en/abp/latest/Audit-Logging#enable-disable-for-entities-properties)

[DisableAuditing]
public class Book : AuditedEntity<int>, IHasConcurrencyStamp
{
    [NotNull]
    public virtual string Title { get; set; }
    public virtual int Pages { get; set; }

    [Audited]
    public virtual DateOnly? PublishDate { get; set; }

    public string ConcurrencyStamp { get; set; }

    protected Book()
    {

    }

    public Book(string title, int pages, DateOnly? publishDate = null)
    {
        ConcurrencyStamp = Guid.NewGuid().ToString("N");

        Check.NotNull(title, nameof(title));
        Title = title;
        Pages = pages;
        PublishDate = publishDate;
    }

}

4 Create a record for the entity 5 Edit the property "Title" of the record 6 In the "Audit logs" page then "Entity Changes" notice how an empty record has been created

It would be helpful if it created the record only when an Audited property is changed.

  • ABP Framework version: v8.1.0
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Steps to reproduce the issue:
  1. Create a solution with Abp 8.1.0.rc.4
  2. Add Entity “Book” with Id int, Code String 10 Required , Title String 100 Required
  3. Open BookManager.cs add the following code in CreateAsync (only for test)
#region test InsertMany
var myBooks = new List< Book >();
for (var i = 0; i < 12000; i++)
{
	myBooks.Add(new Book(i.ToString(),$"Title-{i}"));
}
    
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();

await _bookRepository.InsertManyAsync(myBooks, true);

stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Console.WriteLine(ts); 
#endregion
  1. Lunch in Debug
  2. Via Swagger Post a new Book
  3. Track the time from console log o via breakpoint. On my Pc is 00:00:05.7310325
  4. After that upgrade to Abp 8.1.0
  5. Lunch in Debug
  6. Via Swagger Post a new Book
  7. Track the time from console log o via breakpoint. On my Pc is 00:05:05.4026061

It takes 60 times longer !!!

We use InsertMany in import jobs and execution times have now gone from a few seconds to many minutes and those that used to take a few minutes now take hours.

We cannot upgrade to 8.1.0 stable because it would block the application in production.

From the release logs there is no evidence of changes in this area.

What has changed?

  • ABP Framework version: v8.1.0-rc.3
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: Warning As Error: Detected package downgrade: Volo.Abp.AspNetCore.MultiTenancy from 8.1.0-rc.4 to 8.1.0-rc.3. Reference the package directly from the project to select a different version. Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX 3.1.0-rc.4 -> Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy 8.1.0-rc.4 -> Volo.Abp.AspNetCore.MultiTenancy (>= 8.1.0-rc.4) Volo.Abp.AspNetCore.MultiTenancy (>= 8.1.0-rc.3)
  • Steps to reproduce the issue:
  • Create a new project using Blazor WASM version 8.1.0-rc.3
  • Build the project
  • Notice how it wont build and will output the error message mentioned
  • ABP Framework version: v8.1.0-rc.3
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Description The popup shown with the validations of the form that contains more than one error is displayed in a single line instead of multiple lines.

Reproduction Steps Create a form with inputs and make validations on it

Expected behavior The details of the validation should be multiline

Actual behavior It's displaying in a single line even if it has more than 1 validation

The request is similar to this Issue (but I use blazor WASM instead of MVC): https://github.com/abpframework/abp/issues/19274

  • ABP Framework version: v8.1.0-rc.2
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: none
  • Steps to reproduce the issue:
  • Create a new Abp Blazor wasm project
  • Disable the "enable self registration" setting in the setting page:
  • Implement the code necessary for Azure AD login with external provider:
  • Log into the application using a Azure AD user that doesnt have an account on the application
  • Notice how the application still prompt you with the register option for the account:

If you press the "register" button it will create a new user, this behavior is not correct because it should only let you login if you already have a user in the application, otherwise it should stop you from registering because of the "self registration" setting.

Showing 1 to 10 of 16 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 11, 2025, 10:10