- ABP Framework version: v7.0.0
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no (no layer)
- Exception message and stack trace:
2023-01-19 07:26:02.746 +01:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {
"ActivatorChain": "Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService"
},
"validationErrors": null
}
2023-01-19 07:26:02.746 +01:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {
"ActivatorChain": "Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService"
},
"validationErrors": null
}
2023-01-19 07:26:02.747 +01:00 [ERR] An exception was thrown while activating Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService.
---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Volo.FileManagement.Directories.DirectoryDescriptorAppService' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.FileManagement.Directories.IDirectoryDescriptorRepository directoryDescriptorRepository' of constructor 'Void .ctor(Volo.FileManagement.Directories.IDirectoryManager, Volo.FileManagement.Files.IFileManager, Volo.FileManagement.Directories.IDirectoryDescriptorRepository, Volo.FileManagement.Files.IFileDescriptorRepository, Microsoft.Extensions.Options.IOptions`1[Volo.FileManagement.Files.FileIconOption])'.
at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Extras.DynamicProxy.RegistrationExtensions.<>c__DisplayClass8_0`3.<EnableInterfaceInterceptors>b__1(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass6_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-01-19 07:26:02.747 +01:00 [ERR] An exception was thrown while activating Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService.
---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Volo.FileManagement.Directories.DirectoryDescriptorAppService' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.FileManagement.Directories.IDirectoryDescriptorRepository directoryDescriptorRepository' of constructor 'Void .ctor(Volo.FileManagement.Directories.IDirectoryManager, Volo.FileManagement.Files.IFileManager, Volo.FileManagement.Directories.IDirectoryDescriptorRepository, Volo.FileManagement.Files.IFileDescriptorRepository, Microsoft.Extensions.Options.IOptions`1[Volo.FileManagement.Files.FileIconOption])'.
at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Extras.DynamicProxy.RegistrationExtensions.<>c__DisplayClass8_0`3.<EnableInterfaceInterceptors>b__1(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass6_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-01-19 07:26:02.751 +01:00 [ERR] ---------- Exception Data ----------
ActivatorChain = Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService
2023-01-19 07:26:02.751 +01:00 [ERR] ---------- Exception Data ----------
ActivatorChain = Volo.FileManagement.Directories.DirectoryDescriptorController -> Volo.FileManagement.Directories.DirectoryDescriptorAppService
- Steps to reproduce the issue:"
File Management with database storage provider is working as expected. But not able to implement file system as storage provider. Please find the above exception.
Check the following steps
Add nuget packages to your ProjectName.csproj <ItemGroup> <PackageReference Include="Volo.FileManagement.Web" Version="7.0.0" /> <PackageReference Include="Volo.FileManagement.HttpApi" Version="7.0.0" /> <PackageReference Include="Volo.FileManagement.Application" Version="7.0.0" /> </ItemGroup>
Add npm pakcge to you packages.json and run abp install-libs "dependencies": { ... "@volo/file-management": "^7.0.0" }
Add depends on to your ProjectNameModule // File Management typeof(FileManagementWebModule), typeof(FileManagementHttpApiModule), typeof(FileManagementApplicationModule),
Add the below code on Module file to the ConfigureServices method
Configure<AbpBlobStoringOptions>(options =>
{
options.Containers.Configure<FileManagementContainer>(c =>
{
c.UseFileSystem(fileSystem =>
{
fileSystem.BasePath = "C:\\my-files";
});
});
});
8 Answer(s)
-
0
hi
UseFileSystem
only work for using https://docs.abp.io/en/abp/latest/Blob-StoringThe
ABP File Management
required to use Database(Volo.FileManagement.EntityFrameworkCore
). -
0
Are you saying that ABP File Management wont support File system?
-
0
Yes.
-
0
But I can see that the following article says we can use different storage providers to store the file contents.
https://commercial.abp.io/modules/Volo.FileManagement
-
0
hi
I will confirm this with the team
-
0
hi
Please add the
FileManagementEntityFrameworkCoreModule(Volo.FileManagement.EntityFrameworkCore)
module and config the DbContext. -
0
Hi, Yes added those. Please check the following steps.
But still I couldn't map my local folder as storage. It is creating 2 tables on databased and saving folders and files into it.
Not able to save the files on file system basepath (local system path). Am I missing anything?
Add nuget packages to your ProjectName.csproj <ItemGroup> <PackageReference Include="Volo.FileManagement.Web" Version="7.0.0" /> <PackageReference Include="Volo.FileManagement.HttpApi" Version="7.0.0" /> <PackageReference Include="Volo.FileManagement.Application" Version="7.0.0" /> <PackageReference Include="Volo.FileManagement.EntityFrameworkCore" Version="7.0.0" /> </ItemGroup>
Add npm pakcge to you packages.json and run abp install-libs "dependencies": { ... "@volo/file-management": "^7.0.0" }
Add depends on to your ProjectNameModule // File Management typeof(FileManagementWebModule), typeof(FileManagementHttpApiModule), typeof(FileManagementApplicationModule), typeof(FileManagementEntityFrameworkCoreModule)
Configure entity framework ProjectDbContext OnModuleCreating builder.ConfigureFileManagement();
Add the below code on Module file to the ConfigureServices method
Configure<AbpBlobStoringOptions>(options => { options.Containers.Configure<FileManagementContainer>(c => { c.UseFileSystem(fileSystem => { fileSystem.BasePath = "C:\my-files"; }); }); });
-
0
hi
Your steps are right. Can you share the project? I can check it on my locally.
liming.ma@volosoft.com