Activités de "DominaTang"

I noticed that Abp installed some Serilog packages, one thread in support forum did mentioned about SerilogConfigurationHelper, but couldn't find it in source code.

My question is by modifying which place so that every AppService which has build in Logger property would have new SerigLog behavior. I believe the code below wouldn't change Logger's behavior. var log = new LoggerConfiguration() .WriteTo.RollingFile("log-{Date}.txt") .CreateLogger();

How to setup Serilog file retention policy in Abp Framework for all Micro Services?

  • ABP Framework version: v7.2.1

The integration services are non authorized endpoints and they should not be exposed to gateways.

There are two ways when using synchronous communication between microservices;

  • If you want to consume an exposed endpoint by a microservice which the internal service is authorized, you need to use client-credentials flow to make a request to the related microservice.
  • If your service is not authorized, you can use Integration services.

The suggested way is to write integration services spesifically for the related microservice interactions. You can check the Integration Services documentation.

I will update the documentation to include the integration services aswell.

If service is not authorized, and there is [Integration Service] for the an app service interface, from another microservice what to call this service, what the appsettings.json look like, just added to "RemoteServices" section?

The gateway has no routing for internal services by default, it should be 404 not found.

For inter-micro services communication, is there any special setting for [integration service] or just follow ABP's document regarding to communications between micro services.

I read throw Abp's document about IntegrationService, there is one question, would abp gateway reject request to Integration Service by default in a Micro Services architect.

  • ABP Framework version: v7..2.X
  • 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:

if access CurrentTenant property, would it get the same value in Method1

I think that's fine, ABP will add the current tenant parameters when sending an internal request

Tenant Id currently is in Request header or in access token? I believe UserId are in access token.

Répondre

It looks like use .InsertAysnc(entity,true) resolved the problem.

In Abp MicroSerivce projects, if an API call triggered by UI to MicroService A Method1, and Method1 call Method2 in MicroService B. In Method2, if access CurrentTenant property, would it get the same value in Method1? This is the TenantId, CurrentUser penetrate issue across micro-services.

Thanks

  • ABP Framework version: v7.3.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:
Répondre

Inserted does return Id, line var dbData = repository.GetAsync(inserted.Id); throw exception, can not find entity with Id xxxxx in log, and that guid value is the Guid in MongoDb.

Question

With code below, at the second unit of work section, the line var dbData = repository.GetAsync(inserted.Id); throw exception, there is no Such Entity? Though if check database later, the new record is inserted into database successfully. Does Mongo driver cache the data somewhere?

[UnitOfWork(IsDisabled = true)]
public async Task SubmitAsync(XXXinput dto)
{
    using var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true);
   //Map dto to Domain entity
   var inserted = await repository.InsertAysnc(domainEntity);
    await uow.SaveChangesAsync();
    await uow.CompleteAsync();

   using var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true);
   var dbData =  repository.GetAsync(inserted.Id);
   //Other db operation
 await uow.SaveChangesAsync();
    await uow.CompleteAsync();
}
  • ABP Framework version: v7.2.3
  • 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:
Affichage de 21 à 30 sur 62 entrées
Made with ❤️ on ABP v8.2.0-preview Updated on mars 25, 2024, 15:11