Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "andmattia"

I worked to update our solution, I used the approch describe on ANZ giude Version Updating.

Following this apporch (it's very powefull) I'm able to upgrade my solution but I think it still remain an open point about migration.

On EF pre NetCore you can applied migration created in the past but now EFCore create a file to take a snapshot of db schema so is not possibile to add previous migration. We found 2 solution:

  1. remove all migrations from EF snapshot, add ANZ migration and after that re add custom migration
  2. create a new migration an manully check (index, nameing, etc)
  3. ...

Is it possibile to use different approch to update db?

We had similar issue, in the past, ANZ solution < 6 related to geographical distribution of UI/SQL/REDIS. We enabled REDIS and put REDIS/UI in same region to speed up the query and latency disappear.

I hope this can be usefull to find your issue

  • What is your product version? 9.2
  • What is your product type (Angular or MVC)? angular
  • What is product framework type (.net framework or .net core)? .NetCore

If issue related with ABP Framework

  • What is ABP Framework version? 5.13

I migrate from ABP 4.8.1 -> 5.13 and I found an issue on Swagger

 if (WebConsts.SwaggerUiEnabled)
            {
                //Swagger - Enable this line and the related lines in Configure method to enable swagger UI
                services.AddSwaggerGen(options =>
                {
                    options.SwaggerDoc("v1", new OpenApiInfo() { Title = " API", Version = "v1" });
                    options.DocInclusionPredicate((docName, description) => true);
                    options.ParameterFilter<SwaggerEnumParameterFilter>();
                    options.SchemaFilter<SwaggerEnumSchemaFilter>();
                    options.OperationFilter<SwaggerOperationIdFilter>();
                    //options.OperationFilter<SwaggerOperationFilter>();
                    options.CustomDefaultSchemaIdSelector();
                    options.CustomSchemaIds(o => o.FullName);
                    options.OrderActionsBy(o => o.RelativePath);
                }).AddSwaggerGenNewtonsoftSupport();
            }

my DTO class is

public class InputDto: ...
    {
        public string FilterText { get; set; }
        public long? Id { get; set; }
        ...
        public OrderStatus? Status { get; set; }
        ...
        public OrderStatus[] StatusList { get; set; }
        ...
    }

The only way to fix is add a try catch

private static void AddEnumSpec(Type type, ParameterFilterContext context)
        {
            var schema = context.SchemaRepository.Schemas.GetOrAdd($"#/definitions/{type.Name}", () =>
                context.SchemaGenerator.GenerateSchema(type, context.SchemaRepository)
            );

            if (schema.Reference == null || !type.IsEnum)
            {
                return;
            }

            var enumNames = new OpenApiArray();
            enumNames.AddRange(Enum.GetNames(type).Select(_ => new OpenApiString(_)));
            try
            {
                schema.Extensions.Add("x-enumNames", enumNames);
            }
            catch (Exception ex)
            {
                Console.Write("Ingore this error");
            }
        }

Hi @ismcagdas

I think we/you can add a warning on DbMigrator project when table will be delete to advice user.

Question

Prerequisites

  • What is your product version? 4.8.1 -> 5.11
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? NetCore 3.1

If issue related with ABP Framework

  • What is ABP Framework version? 5.11

I move my app to 5.11 and I find this migration In the same bulk of migration I see a second migration I think is so dangerous. In my case table is empty and no data lost but if I move from different version I can potential lost all data in this table. I see that this migratio is only for raname colum why you decide to release this script and not a Add temp column copy data and remove column?

Answer

Hi @ismcagdas

yes it's correct. Consider that our solution (now has more or less 96 project). On this large solution we have 6 "service" already defined with their own DBContext and table so we have (core,app,shared,web for each service). We are moving to ABP.IO and to do that our path could be move one "service" into a ABP.IO microservice (we no that have some limitation (es. we can use only sync method beacuse RabbitMQ is not available on ANZ)).

Like has you suggest out path is:

  • allow ABP.IO to authenticate via IS on ANZ and we did it only for authcode for now (I'm testing user but I get en infinite loop)
  • move a service in an ABP.IO module (or more)

So our open point still:

  • data comunication from to service
  • SSO from ABP.IO -> ANZ with user credential

For this reason I've create this 2 empty project to create an internla POC a prepare the guide line to implement our pattern.

Our goal could be deploy different service / UI that it use ANZ for authentication (more or less that you do on public web site, support and commercial on ABP.IO) mixing ANZ and ABP.IO.

Answer

So now we can share access from ANZ & ABP.IO (at the moment only via authentication_code in next day we check different auth mode).

Now wich is the best approce to share "data" ANZ is monolityc ABP is modular supose we develop a now module Product (or move some API from ANZ to ABP) respect the picture above we can't have GW.(our UI in Angulr)

How can we use data from new ABP service? From ANZ of course we can use normal TS proxy.

Answer

Hi I see that is a cache related issue. If I give permission to a scope client and not delete / refrash the Redis permission not works fine but I need to delete only key related to client and not all db.

Answer

Hi

ok I can understand it but why if authenticate my abp.io client on ANZ I get an 403 error and if I put a row on abppermissiongrant I get an invalid_grant.

ANZ only give ok or KO for user access (evenutaly can share some date on OpenId configuration like name,email, etc). The scope on ABP.IO give the role/persmission configure.

Are you able to make it work with my two solution? Colud you please share what we need to change?

Answer

Hi

has you see the 2 solution sended via wetransfer?

Showing 11 to 20 of 200 entries