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

Activities of "ale1648604090"

the UpdatePayOrderAsync Method:

            public async Task UpdatePayOrderAsync( UpdatePayOrderInput input )
            {
            if (!input.Id.HasValue)
                return;

            var payOrder = await _payorderRepository.GetAsync( input.Id.Value );
            if (input.ContainerId.HasValue)
            {
                payOrder.ContainerId = input.ContainerId;
            }

            if (input.PayPlanId.HasValue)
            {
                payOrder.PayPlanId = input.PayPlanId;
            }

            if (input.OrderPayPlanType.HasValue)
            {
                payOrder.OrderPayPlanType = input.OrderPayPlanType;
            }

            if (!input.OrderPayId.IsNullOrEmpty())
            {
                payOrder.OrderPayId = input.OrderPayId;
            }

            if (!input.TransactionId.IsNullOrEmpty())
            {
                payOrder.TransactionId = input.TransactionId;
            }

            if (input.IsVerify.HasValue)
            {
                payOrder.IsVerify = input.IsVerify.Value;
            }

            await  _payorderRepository.UpdateAsync( payOrder );
            //await CurrentUnitOfWork.SaveChangesAsync();
        }

When I execute UpdatePayOrderAsync for the second time, I get an exception prompt.

I have a question,My first request was normal, but the second time I made a mistake

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: Unknown error 258 --- End of inner exception stack trace --- at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__122_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteAsync(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(DbContext _, ValueTuple2 parameters, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IReadOnlyList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken) at Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext3.SaveChangesAsync(CancellationToken cancellationToken) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesInDbContextAsync(DbContext dbContext) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesAsync() at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.CompleteUowAsync() at Abp.Domain.Uow.UnitOfWorkBase.CompleteAsync() at Abp.Domain.Uow.UnitOfWorkInterceptor.<>c__DisplayClass6_0.<<PerformAsyncUow>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func1 postAction, Action1 finalAction) at Abp.Threading.InternalAsyncHelper.AwaitTaskWithFinally(Task actualReturnValue, Action`1 finalAction) at GollumPay.Web.PayWeb.Controllers.OrderPayController.PayAction(PayApiRequest payApiRequest) in D:\Project\GollumPay\GollumPayTrunk_1.0\src\GollumPay.Web.PayWeb\Controllers\OrderPayController.cs:line 238

Method first executed by CreatePayOrderAsync,I don't know if it is the impact of CurrentUnitOfWork.SaveChanges();

hello,One of my new projects went wrong while doing dependency injection.

The error message:

Castle.MicroKernel.ComponentActivator.ComponentActivatorException
  HResult=0x80131500
  Message=ComponentActivator: could not instantiate Microsoft.AspNetCore.Mvc.Internal.MvcEndpointDataSource
  Source=Castle.Windsor
  StackTrace:
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.ResolveAll(Type service, Arguments arguments, IReleasePolicy policy)
   at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.ResolveInstanceOrNull(Type serviceType, Boolean isOptional)
   at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.AspNetCore.Builder.MvcApplicationBuilderExtensions.UseMvc(IApplicationBuilder app, Action`1 configureRoutes)
   at GollumPay.Web.PayWeb.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in D:\Project\GollumPay\GollumPayTrunk_1.0\src\GollumPay.Web.PayWeb\Startup\Startup.cs:line 88

Exception 1: Exception: Could not instantiate Microsoft.AspNetCore.Mvc.Internal.MvcEndpointDataSource.

Exception 2: TargetInvocationException: Exception has been thrown by the target of an invocation.

Exception 3: ComponentNotFoundException: No component for supporting the service Abp.AspNetCore.Configuration.AbpAspNetCoreConfiguration was found

my Startup code:

        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
            return services.AddAbp&lt;GollumPayWebPayWebModule&gt;();
        }
        
    [DependsOn(
        typeof(GollumPayWebCoreModule)
    )]
    public class GollumPayWebPayWebModule : AbpModule
    {
        private readonly IHostingEnvironment _env;
        private readonly IConfigurationRoot _appConfiguration;

        public GollumPayWebPayWebModule(
            IHostingEnvironment env)
        {
            _env = env;
            _appConfiguration = env.GetAppConfiguration();
        }

        public override void PreInitialize()
        {
            Configuration.Modules.AspNetZero().LicenseCode = _appConfiguration["AbpZeroLicenseCode"];
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(typeof(GollumPayWebPayWebModule).GetAssembly());
        }

    }
    ```
Showing 1 to 3 of 3 entries