Base solution for your next web application
Open Closed

After upgrade to 11.1 - .NET6 - WebAPI not running - Abp.AbpBootstrapper - System.ArgumentNullException: Value cannot be null. (Parameter 'value') #10960


User avatar
0
pliaspzero created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 11.1
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .NET core

If issue related with ABP Framework

  • What is ABP Framework version?

If issue is about UI

  • Which theme are you using?
  • What are the theme settings?

I try to start .net core WebAPI on IIS (.NET 6.0) - I'm geeting There is already an open DataReader associated with this Connection which must be closed first: How to fix that?

Application: w3wp.exe CoreCLR Version: 6.0.322.12309 .NET Version: 6.0.3 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException: There is already an open DataReader associated with this Connection which must be closed first. at Microsoft.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command) at Microsoft.Data.SqlClient.SqlInternalTransaction.Rollback() at Microsoft.Data.SqlClient.SqlInternalTransaction.Dispose(Boolean disposing) at Microsoft.Data.SqlClient.SqlInternalTransaction.Dispose() at Microsoft.Data.SqlClient.SqlTransaction.Dispose(Boolean disposing) at System.Data.Common.DbTransaction.Dispose() at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Dispose() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.ResetState(Boolean disposeDbConnection) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Dispose() at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.Dispose() at Microsoft.EntityFrameworkCore.DbContext.Dispose() at Castle.MicroKernel.LifecycleConcerns.DisposalConcern.Apply(ComponentModel model, Object component) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.ApplyConcerns(IEnumerable`1 steps, Object instance) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.ApplyDecommissionConcerns(Object instance) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalDestroy(Object instance) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Destroy(Object instance) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Release(Object instance) at Castle.MicroKernel.Handlers.DefaultHandler.ReleaseCore(Burden burden) at Castle.MicroKernel.Handlers.AbstractHandler.Release(Burden burden) at Castle.MicroKernel.Burden.Release() at Castle.MicroKernel.Releasers.LifecycledComponentsReleasePolicy.Dispose() at Castle.MicroKernel.DefaultKernel.DisposeComponentsInstancesWithinTracker() at Castle.MicroKernel.DefaultKernel.Dispose() at Castle.Windsor.WindsorContainer.Dispose() at Castle.Windsor.MsDependencyInjection.GlobalMsLifetimeScope.DisposeInternal() at Castle.Windsor.MsDependencyInjection.MsLifetimeScope.Dispose() at Castle.Windsor.MsDependencyInjection.GlobalScopedWindsorServiceProvider.Dispose() at Microsoft.AspNetCore.Hosting.WebHost.DisposeServiceProviderAsync(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Hosting.WebHost.DisposeAsync() at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token) at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host) at WFMOne.Web.Startup.Program.Main(String[] args) in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\Program.cs:line 14


1 Answer(s)
  • User Avatar
    0
    pliaspzero created

    ok here are more from log:

    FATAL 2022-03-14 16:54:07,957 [1 ] Abp.AbpBootstrapper - System.ArgumentNullException: Value cannot be null. (Parameter 'value') at System.Boolean.Parse(String value) at WFMOne.Web.Startup.WFMOneWebHostModule.ConfigureExternalAuthProviders() in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\WFMOneWebHostModule.cs:line 148 at WFMOne.Web.Startup.WFMOneWebHostModule.PostInitialize() in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\WFMOneWebHostModule.cs:line 76 at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_2(AbpModuleInfo module) at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.Modules.AbpModuleManager.StartModules() at Abp.AbpBootstrapper.Initialize() System.ArgumentNullException: Value cannot be null. (Parameter 'value') at System.Boolean.Parse(String value) at WFMOne.Web.Startup.WFMOneWebHostModule.ConfigureExternalAuthProviders() in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\WFMOneWebHostModule.cs:line 148 at WFMOne.Web.Startup.WFMOneWebHostModule.PostInitialize() in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\WFMOneWebHostModule.cs:line 76 at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_2(AbpModuleInfo module) at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.Modules.AbpModuleManager.StartModules() at Abp.AbpBootstrapper.Initialize() FATAL 2022-03-14 16:54:07,982 [1 ] Microsoft.AspNetCore.Hosting.Diagnostics - Application startup exception System.ArgumentNullException: Value cannot be null. (Parameter 'value') at System.Boolean.Parse(String value) at WFMOne.Web.Startup.WFMOneWebHostModule.ConfigureExternalAuthProviders() in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\WFMOneWebHostModule.cs:line 148 at WFMOne.Web.Startup.WFMOneWebHostModule.PostInitialize() in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\WFMOneWebHostModule.cs:line 76 at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_2(AbpModuleInfo module) at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.Modules.AbpModuleManager.StartModules() at Abp.AbpBootstrapper.Initialize() at Abp.AspNetCore.AbpApplicationBuilderExtensions.InitializeAbp(IApplicationBuilder app) at Abp.AspNetCore.AbpApplicationBuilderExtensions.UseAbp(IApplicationBuilder app, Action1 optionsAction) at WFMOne.Web.Startup.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) in C:\TFSASPZERO2022\src\WFMOne.Web.Host\Startup\Startup.cs:line 290 at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app) at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder) at Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter.<>c__DisplayClass2_0.<Configure>b__0(IApplicationBuilder app) at Microsoft.AspNetCore.Hosting.WebHost.BuildApplication() ERROR 2022-03-14 16:54:08,010 [orker] Microsoft.EntityFrameworkCore.Query - An exception occurred while iterating over the results of a query for context type 'WFMOne.EntityFrameworkCore.WFMOneDbContext'. System.ObjectDisposedException: Cannot access a disposed context instance. A common cause of this error is disposing a context instance that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling 'Dispose' on the context instance, or wrapping it in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances. Object name: 'WFMOneDbContext'. at Microsoft.EntityFrameworkCore.DbContext.CheckDisposed() at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies() at