diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpAspNetCoreComponentsWebAssemblyModule.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpAspNetCoreComponentsWebAssemblyModule.cs index 33716d8383..229831141e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpAspNetCoreComponentsWebAssemblyModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpAspNetCoreComponentsWebAssemblyModule.cs @@ -7,6 +7,7 @@ using Volo.Abp.AspNetCore.Components.Web; using Volo.Abp.AspNetCore.Components.Web.ExceptionHandling; using Volo.Abp.AspNetCore.Components.Web.Security; using Volo.Abp.AspNetCore.Mvc.Client; +using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; using Volo.Abp.Threading; @@ -46,8 +47,8 @@ public class AbpAspNetCoreComponentsWebAssemblyModule : AbpModule public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) { - await context.ServiceProvider.GetRequiredService().InitializeAsync(); - await context.ServiceProvider.GetRequiredService().InitializeAsync(); + await context.ServiceProvider.GetRequiredService().ServiceProvider.GetRequiredService().InitializeAsync(); + await context.ServiceProvider.GetRequiredService().ServiceProvider.GetRequiredService().InitializeAsync(); await SetCurrentLanguageAsync(context.ServiceProvider); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpAspNetCoreMvcClientModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpAspNetCoreMvcClientModule.cs index 7a9168eefb..1d95297a88 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpAspNetCoreMvcClientModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/AbpAspNetCoreMvcClientModule.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus; using Volo.Abp.Modularity; using Volo.Abp.Threading; @@ -19,6 +20,6 @@ public class AbpAspNetCoreMvcClientModule : AbpModule public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) { - await context.ServiceProvider.GetRequiredService().InitializeAsync(); + await context.ServiceProvider.GetRequiredService().ServiceProvider.GetRequiredService().InitializeAsync(); } }