Käyttäjän "christophe.baille" toiminnot

Kysymys
  • ABP Framework version: v6.0.0
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I created a new Blazor server solution with LeptonX theme, then I tried to modify colors the same way as I was doing with "Classic" Lepton Theme:

https://docs.abp.io/en/commercial/latest/themes/customizing-lepton-theme?UI=BlazorServer

It works for most of it, I had to add "!important" to any of my changes as they get overridden by bootstrap-***.css. However I got the issue that some style are important as well on the original css so I can not update them as they get replaced when the page load

I then look at the support and found this ticket:

https://support.abp.io/QA/Questions/3713/Changing-LeptonX-colors

As they said, I added css files to the same path as the LeptonX source code which is:

I copied both css and rtl.css files:

But nothing happened, my colors did not changed.

I then tried to put this file in others locations, and when putting at the following path:

Changes are fine when I am not login yet (If I am right Account module do not use .razor page). However, if not in the Account module (I am then in a .razor page), I do not see my changes anymore.

Could you help me on where I should put this file or if there is anything else to do?

Thanks

  • ABP Framework version: v5.3.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Some BusinessException have been implemented and follow this doc.

https://docs.abp.io/en/abp/latest/Exception-Handling#business-exceptions

If it put the correct information on AbpAuditLogs table which is good, the "popup" do not show exactly what I would expect.

It is not good as the final user will not understand the error

I use this code to throw the error:

            throw new BusinessException(AIGeneratorErrorCodes.ProjectManagement.ProjectMaxCountExceeded)
                .WithData("MaxCount", AIGeneratorConsts.Project.MaxNumberOfProjectsPerUser);

By replacing it with UserFriendlyException, it show the code correctly (apart that I will need to use localizer to get the text), but information are not that good on the AbpAuditLogs table, in Exception field, I do not have MaxCount.

Is there any way to make the popup text for BusinessException as clear as UserFriendlyException?

The issue https://support.abp.io/QA/Questions/3454/Can-not-update-ABP-packages-to-532-through-ABP-suite have been locked but it is not fixed.

I have the issue again while trying to update from 5.3.2 to 5.3.3.

And refund me a ticket please as the other one have been locked with an answer that didn't help

  • ABP Framework version: vX.X.X
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

We created a module that we already use in one of our solutions, now we would like to use it in another ABP solution we made previously.

Is there anyway to have it show on the Modules list of ABP suite? So we will not have to add references manually on each projects of the solution we want to add it.

I guess if possible, it should be referenced as a nugget package?

Issue with * ABP Framework version: v5.3.2

  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

We have a Blazor server application where we did implement external login.

To do so, we did create a method that create us a token

        `var tokenDescriptor = new SecurityTokenDescriptor
        {
            Subject = claimsIdentity,
            Expires = DateTime.UtcNow.AddDays(7),
            SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),

        };
        //creating a token handler
        var tokenHandler = new JwtSecurityTokenHandler();
        var token = tokenHandler.CreateToken(tokenDescriptor);            
        var tokenDescriptor = new SecurityTokenDescriptor
        {
            Subject = claimsIdentity,
            Expires = DateTime.UtcNow.AddDays(7),
            SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),

        };
        //creating a token handler
        var tokenHandler = new JwtSecurityTokenHandler();
        var token = tokenHandler.CreateToken(tokenDescriptor);

       var tokenDescriptor = new SecurityTokenDescriptor  `   

To make the authentication work, this part has been added to the BlazorModule ConfigureAuthentication method:

.AddJwtBearer("Default", options => { options.TokenValidationParameters = new TokenValidationParameters { ValidateIssuer = false, ValidateAudience = false, ValidateLifetime = true, ValidateIssuerSigningKey = true, IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(configuration["Jwt:SecretKey"])) }; });

After that, it was working fine, however, I met an issue with checking my user features:

await _featureChecker.IsEnabledAsync("AIGeneratorFeatures." + item)

was returning false all the time.

It has been fixed with this code

context.Services.AddAuthorization(options =>
{
    var defaultAuthorizationPolicyBuilder = new AuthorizationPolicyBuilder(
        JwtBearerDefaults.AuthenticationScheme, "Default");
        defaultAuthorizationPolicyBuilder.RequireAuthenticatedUser();
    options.DefaultPolicy = defaultAuthorizationPolicyBuilder.Build();
});

But then I got an issue when trying to "Login with this tenant" from my host admin (it was working well before).

HTTP ERROR 401

And I got this on the log file:

2022-08-02 16:47:10.338 +02:00 [INF] Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
2022-08-02 16:47:10.360 +02:00 [INF] AuthenticationScheme: Bearer was challenged.
2022-08-02 16:47:10.362 +02:00 [INF] AuthenticationScheme: Default was challenged.

So from what I understand, the issue is from the "default" AddAuthorization.

Is there any way to have access to the _featureChecker without adding the code causing issues?

I was looking at some support tickets and was then wondering if we are creating the token the right way or if we should use ABP access/token instead, but I didn't find many docs on how to use it...

By using this custom token creator, I worry a bit that we might not have access to some methods/features from ABP.

Thanks for your support

  • ABP Framework version: v5.3.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

In our solution, we want the user to select a plan/edition while registering, on each plan, we want to show a description of the plan. There is a description field for that on the editionUI

As the platform will be multi language, I will replace "My description" by MyDescription and add "MyDescription": "My description" to the en.json file.

What I would like to do, as we might add new plan regularly, is to not have to add the entry on the json file each time we create a new plan as it require to deploy a new version of the solution.

I was then thinking to add the entry directly on the database through the UI of Language Texts, but I do not have possibility to do so as no button.

I then tried to add manually a record on [AbpLanguageTexts] table and all seems working well. It show it on the Language TextsUI and I can use it on my applcation

My question is, is there any way to have the permission of showing a button to let us add an entry?

I don't think I can modify "Language Management" module by myself as the code is not available.

Thanks

  • ABP Framework version: v5.3.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I updated ABP suite and cli to version 5.3.2, then tried to update "All ABP packages" for my solution but it didn't change anything.

I got the message

NPM and NuGet packages updated to v5.0.0 in the solution

but I should get updated to version 5.3.2, when I open a .csproj file it is still 5.0.0. I then updated few csproj to 5.3.2 manually, but when launch the update, it doesn't put them back manually neither...

I then tried to update another project we made before (Angular/MVC) and it update it well.

Is there anything wrong? From what I remember, updates were working fine before. I just had an issue to update from 5.0.0 to 5.2.2 as well, but by updating manually, I got error that packages 5.2.2 didn't exists...

Here is the structure of my solution:

  • ABP Framework version: v5.2.2
  • UI type:Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I need to change permission on some classes/methods to simple [Authorize], which means that the user need to be login only.

However, it doesn't work on my solution. The page show this error load on bottom

and have this errors on the log file:

2022-07-15 14:20:02.757 +02:00 [INF] Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user. 2022-07-15 14:20:02.842 +02:00 [WRN] Unhandled exception rendering component: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown. Volo.Abp.Authorization.AbpAuthorizationException: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.

2022-07-15 14:20:02.842 +02:00 [ERR] Unhandled exception in circuit 'qZKqOCZWoaXjbht_1Vh0-0hjcjLK2a3oEPL04FrfALM'. Volo.Abp.Authorization.AbpAuthorizationException: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown. at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy)

After some tests, I saw that the issue is caused by the class **AbpRefreshEditionIdFilter ** previously implemented regarding another issue:

https://support.abp.io/QA/Questions/2698/Features-availability-based-on-editions-not-working-well

It seems the **InvokeMethodAsync ** fromt the class **AbpRefreshEditionIdFilter ** produce the error "Unhandled exception in circuit", but I am not completely sure. I run into debug and can not find out what is wrong.

Thanks for your support

  • ABP Framework version: v5.0.0
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

In my solution, I want to manage my tenants features based on Editions. To do so, I created some Editions which have features, then I assign editions to Tenants. All seems OK, until I update edition information on tenant table:

EditionEndDateUtc: When I change the EditionEndDateUtc on a tenant from future to past, I can see when login as host/admin user, then go to Tenant/Saas and features, they get disabled. If I change this date from past to future, they become enable, which is good. The update is done right away, no need to close the application, logout or anything.

Now I want to check features for my tenant user to let him use them or not,

from the menu contributor to show or not the menu: var currentFeature = context.ServiceProvider.GetRequiredService<IFeatureChecker>();

fron my applicationservice to let the user make the action or not: await _featureChecker.IsEnabledAsync("AIGeneratorFeatures." + item)

My problem is, in both cases, that the EditionEndDateUtc change will be effective only after the user logout and login again.

Is it a normal behave? For now I am checking EditionEndDateUtc of the tenant but it is not so great, any other possibility to do?

I then notice something a bit strange, the tenant has possibility to change edition, I then check from host/tenant and see features changed based on the edition. However, I met the issue that 2 tenants with the same edition do not have the same features, one of them have no features available anymore, then whatever I put another feature or anything, it remains empty... One here, "payno" do not have any features, but "daypayno" has. whatever I change the Edition for "payno", he is still without feature. Is there any other datas than EditionId and EditionEnd that could affect this?

  • ABP Framework version: v5.0.0
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Stripe payment module integration is working well in our application:

The user open the Mvc application and reach a page with a list of available plans, after choosing one, a new form asking information about the tenant appears. Once the user click save, we create the tenant, create a "Payment request" and redirect the user to Stripe about providing payment information and create subscribtion on Stripe:

Until here, all is working well.

In the solution, Mvc is use only for registration. If the user want to use other features of the solution, he needs to go to the Blazor application.

From Blazor Webassembly application, we want to let the user do 2 things from Stripe:

1- Let the user create a subscribtion

In case the user stop the process of registration from the Stripe page, he will be able to connect to Abp but will not have any subscribtion on his tenant.

So from the index page, I added a button which will create a "Payment request" then redirect him to Stripe:

I tried 2 different way but both fail

1- This method send GET request (which is not good):

I then got an error 400 Bad Request from the console with no much information. This method is not good anyway as we should send POST

2- This method send POST request:

I tried to send the webassembly to a controller

and use LocalRedirectPreserveMethod

I still got an error 400, on this way it send a POST request. The error seems that my request header is empty, which is not the case when I run LocalRedirectPreserveMethod from the MVC view (both Mvc view and the controller here are in the same project "host")

2- Let the user change his payment information

On my blazor UI, I want the user to be able to change his payment information on Stripe. To do this, I had his customer Id on the database and I try to redirect him to the Stripe platform (https://billing.stripe.com)

About doing this, I have no choice than send the user to a controller, so I can not use the method NavManager.NavigateTo

The reason to go through a controller is that I can not create a Stripe Billing portal session from Blazor Webassembly (I can not add the nuggets needed on Blazor project as it is Microsoft.NET.Sdk.BlazorWebAssembly based)

var options = new SessionCreateOptions { Customer = "cus_L012USkjMonYe6", ReturnUrl = "https://example.com/account", }; var service = new SessionService(); var session = service.Create(options);

I create my object on the controller, but when I try to use Return redirect(session.Url) I get a Cors error, even if I add https://billing.stripe.com on the appsettings CorsOrigins part.

I got this error in the browser

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

So I was looking on how to add a header on redirect, but from what I found, it is not possible to define a Cors Header for the redirect method, so I can not use it.

Is there any package or method that I miss to redirect my "Blazor actions" to Stripe through Volo.Abp packages? If not, how I should proceed to redirect?

Thanks for your help

Näytetään 11 - 20/40 tietueesta
Made with ❤️ on ABP v8.2.0-preview Updated on maaliskuuta 25, 2024, 15.11