Open Closed

An exception was thrown while 2023-08-25 12:34:09 activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider #5660


User avatar
0
sanobarm@cloudassert.com created
  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core - SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:

AuthServer terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Vol 2023-08-25 12:34:09 o.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of 2023-08-25 12:34:09 the module Volo.Abp.AspNetCore.AbpAspNetCoreModule, Volo.Abp.AspNetCore, Version 2023-08-25 12:34:09 =7.3.2.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while ac 2023-08-25 12:34:09 tivating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Volo 2023-08-25 12:34:09 .Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> λ:Volo.Abp.VirtualFi 2023-08-25 12:34:09 leSystem.IVirtualFileProvider -> Volo.Abp.VirtualFileSystem.VirtualFileProvider. 2023-08-25 12:34:09 . See the inner exception for details. 2023-08-25 12:34:09 ---> Autofac.Core.DependencyResolutionException: An exception was thrown while 2023-08-25 12:34:09 activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Vo 2023-08-25 12:34:09 lo.Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> λ:Volo.Abp.Virtual 2023-08-25 12:34:09 FileSystem.IVirtualFileProvider -> Volo.Abp.VirtualFileSystem.VirtualFileProvide 2023-08-25 12:34:09 r. 2023-08-25 12:34:09 ---> Autofac.Core.DependencyResolutionException: An exception was thrown while 2023-08-25 12:34:09 invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions1[Vol 2023-08-25 12:34:09 o.Abp.VirtualFileSystem.AbpVirtualFileSystemOptions], Volo.Abp.VirtualFileSystem 2023-08-25 12:34:09 .IDynamicFileProvider)' on type 'VirtualFileProvider'. 2023-08-25 12:34:09 ---> System.IO.DirectoryNotFoundException: C:\WDN.HealthySmiles.Domain.Shared\ 2023-08-25 12:34:09 at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, 2023-08-25 12:34:09 ExclusionFilters filters) 2023-08-25 12:34:09 at Volo.Abp.VirtualFileSystem.VirtualFileSetListExtensions.ReplaceEmbeddedByP 2023-08-25 12:34:09 hysical[T](VirtualFileSetList fileSets, String physicalPath) 2023-08-25 12:34:09 at WDN.HealthySmiles.HealthySmilesAuthServerModule.<>c__DisplayClass1_0.<Conf 2023-08-25 12:34:09 igureServices>b__4(AbpVirtualFileSystemOptions options) in C:\Users\Sanobar\sour 2023-08-25 12:34:09 ce\repos\WDN.HealthySmiles\aspnet-core\src\WDN.HealthySmiles.AuthServer\HealthyS 2023-08-25 12:34:09 milesAuthServerModule.cs:line 152 2023-08-25 12:34:09 at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) 2023-08-25 12:34:09 at Microsoft.Extensions.Options.UnnamedOptionsManager1.get_Value() 2023-08-25 12:34:09 at lambda_method1529(Closure, Object[]) 2023-08-25 12:34:09 at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate() 2023-08-25 12:34:09 --- End of inner exception stack trace --- 2023-08-25 12:34:09 at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate() 2023-08-25 12:34:09 at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action1 nex 2023-08-25 12:34:09 t) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveReques 2023-08-25 12:34:09 tContext context, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(Resol 2023-08-25 12:34:09 veRequestContext context, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Builder.RegistrationBuilder3.<>c__DisplayClass41_0.<PropertiesAut 2023-08-25 12:34:09 owired>b__0(ResolveRequestContext ctxt, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveReques 2023-08-25 12:34:09 tContext context, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute 2023-08-25 12:34:09 (ResolveRequestContext context, Action1 next) 2023-08-25 12:34:09 --- End of inner exception stack trace --- 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute 2023-08-25 12:34:09 (ResolveRequestContext context, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Exe 2023-08-25 12:34:09 cute(ResolveRequestContext context, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.< 2023-08-25 12:34:09 Execute>b__0() 2023-08-25 12:34:09 at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func1 c 2023-08-25 12:34:09 reator) 2023-08-25 12:34:09 at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, N 2023-08-25 12:34:09 ullable1 qualifyingId, Func1 creator) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequest 2023-08-25 12:34:09 Context context, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Exe 2023-08-25 12:34:09 cute(ResolveRequestContext context, Action1 next) 2023-08-25 12:34:09 at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14 2023-08-25 12:34:09 _0.<BuildPipeline>b__1(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) 2023-08-25 12:34:09 at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifeti 2023-08-25 12:34:09 meScope currentOperationScope, ResolveRequest request) 2023-08-25 12:34:09 at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest re 2023-08-25 12:34:09 quest) 2023-08-25 12:34:09 at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request) 2023-08-25 12:34:09 at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest reques 2023-08-25 12:34:09 t) 2023-08-25 12:34:09 at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, 2023-08-25 12:34:09 Service service, IEnumerable1 parameters, Object& instance) 2023-08-25 12:34:09 at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Ser 2023-08-25 12:34:09 vice service, IEnumerable1 parameters) 2023-08-25 12:34:09 at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type servi 2023-08-25 12:34:09 ceType, IEnumerable1 parameters) 2023-08-25 12:34:09 at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type servi 2023-08-25 12:34:09 ceType) 2023-08-25 12:34:09 at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredS 2023-08-25 12:34:09 ervice(Type serviceType) 2023-08-25 12:34:09 at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions. 2023-08-25 12:34:09 GetRequiredService[T](IServiceProvider provider) 2023-08-25 12:34:09 at Volo.Abp.AspNetCore.AbpAspNetCoreModule.OnApplicationInitialization(Applic 2023-08-25 12:34:09 ationInitializationContext context) 2023-08-25 12:34:09 at Volo.Abp.Modularity.AbpModule.OnApplicationInitializationAsync(Application 2023-08-25 12:34:09 InitializationContext context) 2023-08-25 12:34:09 at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor. 2023-08-25 12:34:09 InitializeAsync(ApplicationInitializationContext context, IAbpModule module)
2023-08-25 12:34:09 at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitia 2023-08-25 12:34:09 lizationContext context) 2023-08-25 12:34:09 --- End of inner exception stack trace --- 2023-08-25 12:34:09 at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitia 2023-08-25 12:34:09 lizationContext context) 2023-08-25 12:34:09 at Volo.Abp.AbpApplicationBase.InitializeModulesAsync() 2023-08-25 12:34:09 at Volo.Abp.AbpApplicationWithExternalServiceProvider.InitializeAsync(IServic 2023-08-25 12:34:09 eProvider serviceProvider) 2023-08-25 12:34:09 at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApp 2023-08-25 12:34:09 licationAsync(IApplicationBuilder app) 2023-08-25 12:34:09 at WDN.HealthySmiles.Program.Main(String[] args) in C:\Users\Sanobar\source\r 2023-08-25 12:34:09 epos\WDN.HealthySmiles\aspnet-core\src\WDN.HealthySmiles.AuthServer\Program.cs:l 2023-08-25 12:34:09 ine 38 2023-08-25T07:19:29.130200600Z

  • Steps to reproduce the issue:
  • caused by following two lines when I run it in docker container and also in app service
  •    if (hostingEnvironment.IsDevelopment())
       {
           Configure&lt;AbpVirtualFileSystemOptions&gt;(options =>
           {
               //options.FileSets.ReplaceEmbeddedByPhysical&lt;AppNameDomainSharedModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}WDN.HealthySmiles.Domain.Shared", Path.DirectorySeparatorChar)));
               //options.FileSets.ReplaceEmbeddedByPhysical&lt;HealthySmilesDomainModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}WDN.HealthySmiles.Domain", Path.DirectorySeparatorChar)));
           });
       }
    

Is this required while deployment?


1 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    are you setting ASPNETCORE_ENVIRONMENT as development anywhere while running it in appservice.or docker

    because this is only suppose to run in Development Environment if (hostingEnvironment.IsDevelopment())

    i hope you are building and publish by adding --configuration Options

    dotnet publish --configuration Release

    dotnet build --configuration Release

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38