Base solution for your next web application

Activities of "kylem"

We are at the version 12.3.1 and experienced the same issue when we tried using VS 17.9.x It was fixed after downgrading it to 17.8.5 Upgrading Castle.Windsor.MsDependencyInjection NuGet packages didn't help.

Answer

hi, I already have that file on our own instance of framework and can see the content on our end , your reply about you need to change this function to handle your requirement. was not helpful since I am not sure why we need to modify an internal file on framework to support env agnostic deployments.

Answer

Hi, the link provided is not accessible and returns 404,

I looked into that files locally and am not able to relate to my question would you please provide more details?

thanks, Moe

Question

Hi support team, We are using build-with-ng.ps1 to build our angular application and I can see the power shell generates a Dockerfile for each environment based on parameter we are passing to it.

# aspnet-core/build/outputs/aws/Dockerfile

FROM nginx
COPY . /usr/share/nginx/html
COPY nginx.conf /etc/nginx/

our process currently is:

  1. I use that Dockerfile to build a docker container and push it to dockerhub
  2. On run time when deploying the angular app to the EKS (kubernetes cluster) I mount the right app-config.json file
appconfig.staging.json: |
    {
      "remoteServiceBaseUrl": "{{ .Values.api_url }}",
      "appBaseUrl": "{{ .Values.console_url }}",
      "localeMappings": {
        "angular": [
          {
            "from": "pt-BR",
            "to": "pt"
          },
          {
            "from": "zh-CN",
            "to": "zh"
          },
          {
            "from": "he-IL",
            "to": "he"
          },
          {
            "from": "es-MX",
            "to": "es"
          },
          {
            "from": "vi",
            "to": "en"
          }
        ],
        "luxon": [
          {
            "from": "es-MX",
            "to": "es"
          },
          {
            "from": "zh-Hans",
            "to": "zh-cn"
          },
          {
            "from": "vi",
            "to": "en-gb"
          }
        ],
        "recaptcha": [
          {
            "from": "zh-Hans",
            "to": "zh-cn"
          },
          {
            "from": "es-MX",
            "to": "es"
          }
        ]
      },
      "helpdeskUrl" : "/app/main/helpdesk-not-available",
      "contactUsUrl" : "https://www.denvrdata.com/contact",
      "privacyPolicyUrl" : "https://www.denvrdata.com/privacy",
      "termsOfServiceUrl" : "https://www.denvrdata.com/terms-of-service",
      "documentationUrl" : "https://support.denvrdata.com/portal/en/kb/denvr-cloud",
      "helpdeskTicketsUrl": "/app/main/helpdesk-not-available",
      "defaultClusterUrl": "https://msc1.cloud.denvrdata.com",
      "whatIsNewUrl": "https://support.denvrdata.com/portal/en/kb/articles/whats-new",
      "termsAndConditionsUrl": "https://www.denvrdata.com/terms-of-use-embedded",
      "trialTermsAndConditionsUrl": "https://www.denvrdata.com/test-drive-terms-of-use-embedded"
    }

also noticed there is an env variable difference between environments

- name: ASPNETCORE_ENVIRONMENT
  value: "Staging"
- name: ASPNETCORE_URLS
  value: "http://+:80"

Technically what I am trying to do is I want to build only one docker container image for each version we build and use that across all environemtns currently we have dev and prod I want to pass appconfig.json and env variables to reuse the same built image,

  1. is this something you are encouraging us not to do?
  2. do you have any suggestion for us?
  3. is this going to be breaking change since ng build --configuration dev,staging,prod adds something else that we are not aware of?
  4. can we simplify our build-with-ng.ps1 to only one generic environment neutral build and pass args as explained above?

#kubernetes #EKS #githubactions #docekrfile #dockerbuild #dockerhub #configmap

great thanks,
Moe - [email protected] - 1(416)824-1670

Issue created: https://github.com/aspnetzero/aspnet-zero-core/issues/4957

Some more info:

We are currently migrating to version 12.2.1 of the framework, which uses ABP v8.2.0. Our current version in production is using v7.1.0 of ABP.

In both cases same exception is thrown.

8.2.0

Hi, we noticed that when we cal TokenAuthController.Authenticate() method called for the same user, by 2 different transactions running approximately a the same time, one will fail with:

The database operation was expected to affect 1 row(s), but actually affected 0 row(s)

My understanding is that code is using optimistic locking and the second transaction fails as user data has already been changed by the first.

It looks like exception is happening in AbpLoginManager.TryLoginFromExternalAuthenticationSourceAsync() (see full stack trace below).

Is there a way to change the code so that both transactions eventually succeed?

Abp.Domain.Uow.AbpDbConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
 ---> Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken)
   at Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext`3.SaveChangesAsync(CancellationToken cancellationToken)
   at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesAsync()
   at Abp.Authorization.AbpLogInManager`3.TryLoginFromExternalAuthenticationSourcesAsync(String userNameOrEmailAddress, String plainPassword, TTenant tenant)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at Abp.Authorization.AbpLogInManager`3.LoginAsyncInternal(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at Abp.Authorization.AbpLogInManager`3.<>c__DisplayClass36_0.<<LoginAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Abp.Domain.Uow.UnitOfWorkManagerExtensions.WithUnitOfWorkAsync[TResult](IUnitOfWorkManager manager, Func`1 action, UnitOfWorkOptions options)
   at Abp.Authorization.AbpLogInManager`3.LoginAsync(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at DenvrDashboard.Web.Controllers.TokenAuthController.GetLoginResultAsync(String usernameOrEmailAddress, String password, String tenancyName) in C:\Users\PejaRadojkovic\workspace\tmp\DenvrDashboard\aspnet-core\src\DenvrDashboard.Web.Core\Controllers\TokenAuthController.cs:line 798
   at DenvrDashboard.Web.Controllers.TokenAuthController.Authenticate(AuthenticateModel model) in C:\Users\PejaRadojkovic\workspace\tmp\DenvrDashboard\aspnet-core\src\DenvrDashboard.Web.Core\Controllers\TokenAuthController.cs:line 147
   at lambda_method1476(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Hi, we are upgrading to the release 12.2.1. I tried downloading Metronic theme for the release, but cannot find it on the download page. The latest one is for release 11.0.0 (8.0.26). Thanks. Peja

This is great to hear, thanks.

Showing 1 to 10 of 36 entries