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

Activities of "kylem"

We tried upgrading Visual Studio but it doesn't work with our version of ASP.NET Zero. We are running into similar issues as: https://support.aspnetzero.com/QA/Questions/11843/Receiving-this-error-httpsgithubcomaspnetboilerplateaspnetboilerplateissues6755

I have another laptop, which didn't upgrade to the Power Tools 4.4.0, and all is good there. So, all we need is ability to downgrade to a previous version of Power Tools for now.

Sorry, I am not able to share our project with you at this point.

Hello there, I am running version 17.8.5 of Visual Studio 2022. We are at 12.3.1 version of ASP.NET zero.

Recently Power Tools started throwing this error

In Visual Studio I had ticked option to automatically upgrade to latest version of Power Tools, and I believe this is causing this error.

It looks like that visual studio marketplace has only the latest version: https://marketplace.visualstudio.com/items?itemName=Volosoft.AspNetZeroPowerTools&ssr=false#overview

Would you be able to help me with this?

Thanks, Peja

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)

Showing 1 to 10 of 38 entries