- ABP Framework version: v8.0.2
- UI Type: Microservice - MVC - Created using ABP Studio
- Database System: MongoDB
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace: N/A
- Steps to reproduce the issue:
- Add new service using Studio UI - template: service-nolayer
- Apply step-by-step the required changes which are well described in the services/cms/README.md file
- Add cmskit-pro modules using Studio's import module
- Add
Volo.CmsKit.Pro.Application.Contracts
to theMyProject.CmsService.Contracts
- Add
Volo.CmsKit.Pro.Application
,Volo.CmsKit.Pro.HttpApi
andVolo.CmsKit.Pro.MongoDB
to theMyProject.CmsService
- Add
Volo.CmsKit.Pro.Domain.Shared
to theMyProject.AdministrationService
for permissions and features - Add
Volo.CmsKit.Pro.Web
,Volo.CmsKit.Pro.HttpApi.Client
andMyProject.CmsService.Contracts
to theMyProject.Web
- Add
- Enable
CmsKit
andCmsKitPro
global features forMyProject.CmsService.Contracts
MyProject.AdministrationService
MyProject.Web
- Replace
ICmsKitProMongoDbContext
andICmsKitMongoDbContext
viaCmsServiceDbContext
usingReplaceDbContext
attribute. - Run the application.
What did I forget?
5 Answer(s)
-
0
Add
Volo.CmsKit.Pro.Domain.Shared
to theMyProject.AdministrationService
for permissions and featuresI added
Volo.CmsKit.Pro.Application.Contracts
and now the permissions are available too. But, I haveSystem.ArgumentNullException
for connectionString in CmsService and its throw atBlog Posts
index.any other pages work as expected.
at MongoDB.Driver.Core.Misc.Ensure.IsNotNull[T](T value, String paramName) at MongoDB.Driver.Core.Configuration.ConnectionString..ctor(String connectionString, Boolean isInternalRepresentation, IDnsResolver dnsResolver) at MongoDB.Driver.Core.Configuration.ConnectionString..ctor(String connectionString) at MongoDB.Driver.MongoUrlBuilder.Parse(String url) at MongoDB.Driver.MongoUrlBuilder..ctor(String url) at MongoDB.Driver.MongoUrl..ctor(String url) at Volo.Abp.Uow.MongoDB.UnitOfWorkMongoDbContextProvider`1.GetDbContextAsync(CancellationToken cancellationToken) at Volo.CmsKit.MongoDB.Blogs.MongoBlogPostRepository.GetListAsync(String filter, Nullable`1 blogId, Nullable`1 authorId, Nullable`1 tagId, Nullable`1 statusFilter, Int32 maxResultCount, Int32 skipCount, String sorting, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.CmsKit.Admin.Blogs.BlogPostAdminAppService.GetListAsync(BlogPostGetListInput input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at lambda_method1790(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
I think this is related to
CmsUser
and userLookup service. But I already configured connectionStringMap for abpIdentity:Configure<AbpDbConnectionOptions>(options => { options.Databases.Configure("Administration", database => { database.MappedConnections.Add(AbpPermissionManagementDbProperties.ConnectionStringName); database.MappedConnections.Add(AbpFeatureManagementDbProperties.ConnectionStringName); database.MappedConnections.Add(AbpSettingManagementDbProperties.ConnectionStringName); database.MappedConnections.Add(LanguageManagementDbProperties.ConnectionStringName); }); options.Databases.Configure("Identity", database => { database.MappedConnections.Add(AbpIdentityDbProperties.ConnectionStringName); }); options.Databases.Configure("AuditLoggingService", database => { database.MappedConnections.Add(AbpAuditLoggingDbProperties.ConnectionStringName); }); options.Databases.Configure("SaasService", database => { database.MappedConnections.Add(SaasDbProperties.ConnectionStringName); }); });
-
0
It was solved after mapping
AbpCmsKitDbProperties.ConnectionStringName
to service connectionString -
0
Everything works as expected in admin and public side, but the creation of the blog post does not. I have DI exception:
DependencyResolutionException: None of the constructors found on type 'Volo.CmsKit.Admin.Web.Pages.CmsKit.Tags.Components.TagEditor.TagEditorViewComponent' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.CmsKit.Tags.ITagAppService tagAppService' of constructor 'Void .ctor(Volo.CmsKit.Tags.ITagAppService)'. See https://autofac.rtfd.io/help/no-constructors-bindable for more info. Autofac.Core.Activators.Reflection.ReflectionActivator+<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action<ResolveRequestContext> next) DependencyResolutionException: An exception was thrown while activating Volo.CmsKit.Admin.Web.Pages.CmsKit.Tags.Components.TagEditor.TagEditorViewComponent. Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action<ResolveRequestContext> next)
-
0
OK. I found the error. TagAppService is only implemented in public package but used in admin package.
as workaround, We also need to add the
CmsKitProPublicHttpApiClientModule
to theweb
but I am waiting for a response, maybe a better way will be suggested from the team. -
0
hi
It's basically correct, You are doing the right things.
Your questions credit has been refunded.