Aktivity „pierremih“

Hi, Our project is a monolithic Angular application on which we sticked a second application layer containing a Blazor front. (see the screenshot) As a consequence it has two separate Swagger apps.

When connecting on one of them, then connecting on the other one, calling some of the defined APIs on the first one generates an error. "The antiforgery token could not be decrypted." I think we failed to configure the Authentication server properly or possibly the application layers themselves.

Do you have any information on what we could have missed to generate that kind of error?

  • ABP Framework version: v7.0.0
  • UI type: Angular and Blazor (not relevant here)
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: [14:07:47 INF] Request starting HTTP/2 POST https://localhost:44340/api/app/data-seeding-admin-side/insert-random-data-everywhere?nbLignesAInserer=2 - 0 [14:07:47 INF] CORS policy execution failed. [14:07:47 INF] Request origin https://localhost:44340 does not have permission to access the resource. [14:07:47 INF] Executing endpoint 'ConfigurateurClient.Admin.DataSeeding.DataSeedingAdminSideAppService.PostInsertRandomDataEverywhere (ConfigurateurClient.Admin.Application)' [14:07:47 INF] Route matched with {action = "PostInsertRandomDataEverywhere", controller = "DataSeedingAdminSide", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task PostInsertRandomDataEverywhere(Int32) on controller ConfigurateurClient.Admin.DataSeeding.DataSeedingAdminSideAppService (ConfigurateurClient.Admin.Application). [14:07:47 WRN] The antiforgery token could not be decrypted. [14:07:47 INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. [14:07:47 INF] Executing StatusCodeResult, setting HTTP status code 400
  • Steps to reproduce the issue: Have two Application layers. Connect on Swagger 1. Connect on Swagger 2. Call Swagger 1.

Hi, I'm @berly's coworker.

Our application's architecture was explained in a previous ticket https://support.abp.io/QA/Questions/4494/Two-Application-layers-the-antiforgery-token-could-not-be-decrypted

We are having issues configuring the Mailing service of ABP.

We found multiple appsettings.json files in which we can configure the Abp.Mailing.Smtp.Password.

However, after setting it this way, it seems the password is getting wiped after a given amount of time.

Note that we at some point (I do not know the details), have used the /api/setting-management/emailing API shown above.

Thank you,

Is our issue being investigated ? Thanks

Sorry for the delay, here are the full steps :

  • Have our project running. For that, we would give you access to our github repo which also has the required docker environment required to run it.
  • using the "Admin" swagger, call "setting-management/emailing" with POST to define email settings.
  • using the "Admin" swagger, call the API "emailing/send-test-email" to try to send an email. It should be working properly.
  • using the other swagger, call "setting-management/emailing" with GET to check if the modifications applied there too. It shouldn't.
  • using the other swagger, then call "setting-management/emailing" with POST to define email settings there too.
  • using the other swagger, call the API "emailing/send-test-email" to try to send an email. It should be working properly.
  • using the "Admin" swagger, call the API "emailing/send-test-email" to try to send an email to make sure it's still working. It should be
  • Wait between 30 minutes to 1 hour
  • using the both swaggers, call both "setting-management/emailing" with GET. One of the passwords got wiped.

If you do not want to reproduce the issue locally, we have a test version running and published. We can grant you access to that. Emails are only sent when using a production environment and a properly set SMTP server, which isn't included in that project.

We haven't granted you access yet. Can you confirm this is the github account we will give access to ? https://github.com/realLiangshiwei

I granted you access to the repo

I understand that this causes issues indeed. We will fix that point. It should resolve many issues we are having.

Thank you, it seems to have solved the issue.

We have a related issue. The emailing password is not set on startup or database seeding. We are not using ABP's Settings system but Microsoft's Configuration System and the appsettings.json files, as suggested in ABP's documentation.

  • https://docs.abp.io/en/abp/latest/Emailing#email-settings
  • https://docs.abp.io/en/abp/latest/Settings
  • https://docs.abp.io/en/abp/latest/Configuration

Is there any way to solve this ?

EDIT : The password does not reset on restart. We would like to set it initially using the Configuration system.

Hi, In-depth debugging of the AbpHangfireAuthorizationFilter seems impossible becaue the .pdb symbols file cannot be found Can you give me indications on how debug AbpHangfireAuthorizationFilter to confirm that CurrentUser.IsAuthenticated is returning false?

Zobrazených 1 až 10 z 38 záznamov
Made with ❤️ on ABP v8.2.0-preview Updated on marca 25, 2024, 15:11