Activities of "niall"

Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v8.2.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I created a project named as My.Platform with follow parameters

ABP Version: 8.2.2
UI framework: MVC
Theme: Lepton-X
Theme style: System
Mobile: None
Database provider: EFC
Database management system: MySQL
Connection string: Server=localhost;Port=3306;Database=XTC.BaaSo;Uid=root;Pwd=;
Public web site: Yes
Cms-Kit: Yes
Separate tenant schema: Yes
Tiered: Yes

and i created a project named as My.Plugin with follow command

abp new My.Plugin -t module

then i direct build the My.Plugin, got some files. i load them at My.Platform.HttpApi.Host/Program.cs like this:


    ......
            builder.Host
                .AddAppSettingsSecretsJson()
                .UseAutofac()
                .UseSerilog();
            await builder.AddApplicationAsync<BaaSoHttpApiHostModule>(_options =>
            {
                var configuration = _options.Services.GetConfiguration();
                var businessUnitsPath = configuration["BusinessUnits:Path"];
                if (businessUnitsPath.IsNullOrWhiteSpace())
                {
                    throw new AbpException("the BusinessUnits is null or empty!");
                }
                businessUnitsPath = Environment.ExpandEnvironmentVariables(businessUnitsPath);
                if (!Directory.Exists(businessUnitsPath))
                {
                    throw new AbpException($"BusinessUnitsPath:{businessUnitsPath} not found!");
                }

                var files = new List<string>();
                foreach (var file in Directory.GetFiles(businessUnitsPath))
                {
                    Log.Information($"Found a BusinessUnit: {Path.GetFileName(file)}");
                    files.Add(file);
                }
                _options.PlugInSources.AddFiles(files.ToArray());
            });
            var app = builder.Build();
    ......

Is this the right thing to do? and how put the api of My.Plugin to another definition at page of swagger(now all in a same definition)

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v7.3.2 commercial
  • UI Type: MVC
  • Database System: EF Core (MySQL.)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I use the microservice-pro template, now i need to deployment them in my cloud.

i want to use console.mydomain.com access the web, use www.mydomain.com access the publicweb, use auth.mydomain.com access the authserver.

I saw the appsettings.json of every service, but i dont sure which filed should bind the domain, i try modify some fields, but throw exceptions :(

AuthServer/appsettings.json

{
  "App": {
    "SelfUrl": "http://10.1.100.11:8000",
    "CorsOrigins": "*",
    "RedirectAllowedUrls": "http://10.1.100.11:8000",
    "DisablePII": "false"
  },
  "AuthServer": {
    "Authority": "http://10.1.100.11:8000",
    "RequireHttpsMetadata": "false",
    "SwaggerClientId": "WebGateway_Swagger"
  },
  ...
 }

IdentityService/appsettings.json

{
  "App": {
    "SelfUrl": "http://10.1.100.11:8001",
    "CorsOrigins": "*"
  },
  "AuthServer": {
    "Authority": "http://10.1.100.11:8000",
    "RequireHttpsMetadata": "false",
    "SwaggerClientId": "WebGateway_Swagger"
  },
  ...
}

AdministrationService/appsettings.json

{
  "App": {
    "SelfUrl": "http://10.1.100.11:8002",
    "CorsOrigins": "*"
  },
  "AuthServer": {
    "Authority": "http://10.1.100.11:8000",
    "RequireHttpsMetadata": "false",
    "SwaggerClientId": "WebGateway_Swagger"
  },
  "RemoteServices": {
    "AbpIdentity": {
      "BaseUrl": "http://10.1.100.11:8001/",
      "UseCurrentAccessToken": "false"
    }
  },
  "IdentityClients": {
    "Default": {
      "GrantType": "client_credentials",
      "ClientId": "AdministrationService",
      "ClientSecret": "1q2w3e*",
      "Authority": "http://10.1.100.11:8000",
      "Scope": "IdentityService",
      "RequireHttps": "false",
      "ValidateIssuerName": "false",
      "ValidateEndpoints ": "false"
    }
  },
  ...
}

SaasService/appsettings.json

{
  "App": {
    "SelfUrl": "http://10.1.100.11:8003",
    "CorsOrigins": "*"
  },
  "AuthServer": {
    "Authority": "http://10.1.100.11:8000",
    "RequireHttpsMetadata": "false",
    "SwaggerClientId": "WebGateway_Swagger"
  },
  ...
  }

WebGateway/appsettings.json

{
  "App": {
    "SelfUrl": "http://10.1.100.11:8080",
    "CorsOrigins": "*"
  },
  "AuthServer": {
    "Authority": "http://10.1.100.11:8000",
    "RequireHttpsMetadata": "false",
    "SwaggerClientId": "WebGateway_Swagger",
    ...
    }
    ...
}

WebGateway/ocelot.json

{
  "GlobalConfiguration": {
    "BaseUrl": "http://10.1.100.11:8080"
  },
  "Routes": [
    {
      "ServiceKey": "Account Service",
      "ServiceDns": "http://10.1.100.11:8000",
      "DownstreamPathTemplate": "/api/account/{everything}",
      "DownstreamScheme": "http",
      "DownstreamHostAndPorts": [
        {
          "Host": "10.1.100.11",
          "Port": 8000
        }
      ],
      "UpstreamPathTemplate": "/api/account/{everything}",
      "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
    },
    ...
    ]
}

Web/appsettings.json

{
  "App": {
    "SelfUrl": "http://10.1.100.11:8081"
  },
  "AuthServer": {
    "Authority": "http://10.1.100.11:8000",
    "RequireHttpsMetadata": "false",
    "ClientId": "Web",
    "ClientSecret": "1q2w3e*",
    "IsOnK8s": "false",
    "MetaAddress": "http://10.1.100.11:8000",
  },
  "RemoteServices": {
    "Default": {
      "BaseUrl": "http://10.1.100.11:8080"
    }
  },
  ...
 }
Question

I customize LeptonX Theme, happended a visually uncomfortable issue. when i refresh or switch the page, a default picture for a very short time is displayed.

Is there any way to resolve it?

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v7.3.2
  • UI Type: MVC
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
[14:28:42 INF] Request starting HTTP/1.1 GET https://localhost:44360/api/cms-kit-public/pages?api-version=1.0 - 0
[14:28:42 INF] Executing endpoint 'Volo.CmsKit.Public.Pages.PagesPublicController.FindDefaultHomePageAsync (Volo.CmsKit.Public.HttpApi)'
[14:28:42 INF] Route matched with {area = "cms-kit", action = "FindDefaultHomePage", controller = "PagesPublic"}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.CmsKit.Contents.PageDto] FindDefaultHomePageAsync() on controller Volo.CmsKit.Public.Pages.PagesPublicController (Volo.CmsKit.Public.HttpApi).
[14:28:43 ERR] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "An internal error occurred during your request!",
  "details": null,
  "data": {
    "ActivatorChain": "Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext, Volo.CmsKit.EntityFrameworkCore, Version=7.3.2.0, Culture=neutral, PublicKeyToken=null]]"
  },
  "validationErrors": null
}

[14:28:43 ERR] An exception was thrown while activating Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext, Volo.CmsKit.EntityFrameworkCore, Version=7.3.2.0, Culture=neutral, PublicKeyToken=null]].
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext, Volo.CmsKit.EntityFrameworkCore, Version=7.3.2.0, Culture=neutral, PublicKeyToken=null]].
 ---> Volo.Abp.AbpException: No configuration found for Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore, Version=7.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60! Use services.Configure<AbpDbContextOptions>(...) to configure it.
   at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Configure[TDbContext](AbpDbContextOptions options, AbpDbContextConfigurationContext`1 context)
   at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Create[TDbContext](IServiceProvider serviceProvider)
   at Autofac.Extensions.DependencyInjection.AutofacRegistration.&lt;&gt;c__DisplayClass3_0.&lt;Register&gt;b__0(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Delegate.DelegateActivator.&lt;ConfigurePipeline&gt;b__2_0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;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.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.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;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.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(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 Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
   at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.GetDbContextAsync()
   at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`2.GetDbSetAsync()
   at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`2.GetListAsync(Expression`1 predicate, Boolean includeDetails, 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.Pages.PageManager.GetHomePageAsync()
   at Volo.CmsKit.Public.Pages.PagePublicAppService.FindDefaultHomePageAsync()
   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.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.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at lambda_method1630(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.&lt;InvokeNextActionFilterAsync&gt;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.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
[14:28:43 ERR] ---------- Exception Data ----------
ActivatorChain = Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.CmsKit.EntityFrameworkCore.CmsKitDbContext, Volo.CmsKit.EntityFrameworkCore, Version=7.3.2.0, Culture=neutral, PublicKeyToken=null]]
  • Steps to reproduce the issue:

I use the MicroService-pro template created a solution.

Add CmsKit-Pro Module to product service use abp suite.

Enabled the feature of CmsKit pro in Domain.Shared

  GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit =>
            {
                cmsKit.EnableAll();
            });

            GlobalFeatureManager.Instance.Modules.CmsKitPro(cmsKitPro =>
            {
                cmsKitPro.EnableAll();
            });

I run the solution, throw exception.

ProductServiceDbContext.cs

[ConnectionStringName(ProductServiceDbProperties.ConnectionStringName)]
public class ProductServiceDbContext : AbpDbContext<ProductServiceDbContext>
{
    public DbSet<Product> Products { get; set; }

    public ProductServiceDbContext(DbContextOptions<ProductServiceDbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureProductService();
        builder.ConfigureCmsKitPro();
        builder.ConfigureCmsKit();
    }
}

ProductServiceDbContextFactory.cs

public class ProductServiceDbContextFactory : IDesignTimeDbContextFactory<ProductServiceDbContext>
{
    private readonly string _connectionString;

    /* This constructor is used when you use EF Core tooling (e.g. Update-Database) */
    public ProductServiceDbContextFactory()
    {
        _connectionString = GetConnectionStringFromConfiguration();
    }

    public ProductServiceDbContext CreateDbContext(string[] args)
    {
        ProductServiceEfCoreEntityExtensionMappings.Configure();

        var builder = new DbContextOptionsBuilder<ProductServiceDbContext>()
            .UseMySql(_connectionString, MySqlServerVersion.LatestSupportedServerVersion, b =>
            {
                b.MigrationsHistoryTable("__ProductService_Migrations");
            });

        return new ProductServiceDbContext(builder.Options);
    }

    private static string GetConnectionStringFromConfiguration()
    {
        return BuildConfiguration()
            .GetConnectionString(ProductServiceDbProperties.ConnectionStringName);
    }

    private static IConfigurationRoot BuildConfiguration()
    {
        var builder = new ConfigurationBuilder()
            .SetBasePath(
                Path.Combine(
                    Directory.GetCurrentDirectory(),
                    $"..{Path.DirectorySeparatorChar}XTC.BaaSo.ProductService.HttpApi.Host"
                )
            )
            .AddJsonFile("appsettings.json", optional: false);

        return builder.Build();
    }
}

ProductServiceEntityFrameworkCoreModule.cs

[DependsOn(
    typeof(AbpEntityFrameworkCoreMySQLModule),
    typeof(AbpEntityFrameworkCoreModule),
    typeof(ProductServiceDomainModule)
)]
[DependsOn(typeof(CmsKitProEntityFrameworkCoreModule))]
public class ProductServiceEntityFrameworkCoreModule : AbpModule
{
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        ProductServiceEfCoreEntityExtensionMappings.Configure();
    }

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAbpDbContext<ProductServiceDbContext>(options =>
        {
            /* Remove "includeAllEntities: true" to create
             * default repositories only for aggregate roots */
            options.AddDefaultRepositories(includeAllEntities: true);
            options.AddRepository<Product, EfCoreProductRepository>();
        });

        context.Services.Configure<AbpDbContextOptions>(options => { });

        Configure<AbpDbContextOptions>(options =>
        {
            options.Configure<ProductServiceDbContext>(c =>
            {
                c.UseMySQL(b =>
                {
                    b.MigrationsHistoryTable("__ProductService_Migrations");
                });
            });
        });
    }
}
  • ABP Framework version: v7.3.2
  • UI Type: MVC
  • Database System: EF Core ( MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:

[15:48:51 ERR] An exception was thrown attempting to execute the error handler. System.InvalidOperationException: The view 'Components/MessagesToolbarItem//Pages/Chat/Components/MessagesToolbarItem/Default.cshtml' was not found. The following locations were searched: /Pages/Chat/Components/MessagesToolbarItem/Default.cshtml

  • Steps to reproduce the issue:
Question

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v7.3.2
  • UI Type: MVC
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

I use the MVC ui, in MyServiceWeb/Pages/Product/index.js, i want to implement two functions, TODO 1 and TODO 2:

 var dataTable = $("#ProductTable").DataTable(abp.libs.datatables.normalizeConfiguration({
        processing: true,
        serverSide: true,
        paging: true,
        searching: false,
        scrollX: true,
        autoWidth: false,
        scrollCollapse: true,
        order: [[0, "asc"]],
        ajax: abp.libs.datatables.createAjax(productSpace.getList, getFilter),
        columnDefs: [
            { data: "name" },
            { data: "spaceKey" },
            {
                //TODO 1
                render: function (data) {
                    return '<button type="button" class="btn btn-outline-primary"></button>';
                }
            },
            {
                rowAction: {
                    items:
                        [
                            {
                                text: l("Browse"),
                                visible: true,
                                action: function (data) {
                                    console.log(data.record.id);
                                    //TODO 2
                                }
                            },
                            {
                                text: l("Edit"),
                                visible: abp.auth.isGranted('XTC.LicenseService.Space.Edit'),
                                action: function (data) {
                                    editModal.open({
                                        id: data.record.id
                                    });
                                }
                            },
                            {
                                text: l("Delete"),
                                visible: abp.auth.isGranted('XTC.LicenseService.Space.Delete'),
                                confirmMessage: function () {
                                    return l("DeleteConfirmationMessage");
                                },
                                action: function (data) {
                                    abp.notify.error(l("NotSupportDeleteFromWeb"));
                                    return;
                                    serviceSpace.delete(data.record.id)
                                        .then(function () {
                                            abp.notify.info(l("SuccessfullyDeleted"));
                                            dataTable.ajax.reloadEx();
                                        });
                                }
                            }
                        ]
                }
            }
        ]
    }));

and my MyServiceWeb/Pages/Product/Index.cshtml.cs like this :

public class IndexModel : LicenseServicePageModel
{
    public string NameFilter { get; set; }
    
    public void Handle() {}
}

At //TODO 1 How to add click event for button in table? I saw the https://docs.abp.io/en/abp/latest/UI/AspNetCore/Tag-Helpers/Buttons, but nothing found.

At //TODO 2 How to invoke the IndexModel.Handle() ?

I download the source code of leptonx-demo. but only found some html files.

I use the MVC UI, hope to see how to implement some samples at https://x.leptontheme.com/side-menu, for example https://x.leptontheme.com/side-menu/login-pages/login-2.

Is there a document or source code explain to how to implement components with MVC UI about https://x.leptontheme.com/side-menu?

I saw the https://docs.abp.io/en/commercial/latest/themes/lepton-x/mvc, but nothing about apb-card, abp-table etc.

I am using the apb commercial to build a cloud project, and use the microservice-pro template. I plan to provide users with an SDK to develop standalone microservices to access our platform.

But I notice LeptonX-pro libraries need commercial license, need login into abp account. So is there a way for users without logging into the ABP account when developing? Or do we provide a project file with license(appsettings.secret.json) for the user to use?

  • ABP Framework version: v7.3.2
  • UI Type: MVC
  • Database System: EF Core ( MySQ)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:

[09:12:19 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "对不起,在处理你的请求期间,产生了一个服务器内部错误!", "details": null, "data": {}, "validationErrors": null }

[09:12:19 ERR] Could not found remote action for method: System.Threading.Tasks.Task1[XTC.BaaSo.VendorService.Vendors.VendorDTO] CreateAsync(XTC.BaaSo.VendorService.Vendors.VendorCreateDTO) on the URL: https://localhost:44380 Volo.Abp.AbpException: Could not found remote action for method: System.Threading.Tasks.Task1[XTC.BaaSo.VendorService.Vendors.VendorDTO] CreateAsync(XTC.BaaSo.VendorService.Vendors.VendorCreateDTO) on the URL: https://localhost:44380 at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.GetActionApiDescriptionModel(IAbpMethodInvocation invocation) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at XTC.BaaSo.VendorService.Web.Pages.Vendors.CreateModalModel.OnPostAsync() in E:\github\BaaSo\BaaSo-Cloud\vs2022\services\vendor\src\XTC.BaaSo.VendorService.Web\Pages\Vendors\CreateModal.cshtml.cs:line 28 at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()

  • Steps to reproduce the issue:
  1. I created a microservice-pro
  2. Follow the ProductService sample to implement my new service VendorService.
  3. generated the clientproxy and migration database.
  4. Run the AuthServer, IdentityService, AdministrationServicce, SaasService, ProducService, VendorService(https://localhost:44361), WebGateway(https://localhost:44380), Web(https://localhost:44381)
  5. GetList, Create, Update, Delete of the ProductService works fine at Web(https://localhost:44381)
  6. GetList of the VendorService works fine and return items at Web(https://localhost:44381), but Create throw the CreateAsync Exception

I found create the product, log like this:

[09:10:04 INF] Executing handler method XTC.BaaSo.ProductService.Web.Pages.Products.CreateModalModel.OnPostAsync - ModelState is Valid
[09:10:04 INF] Start processing HTTP request POST https://localhost:44380/api/product-service/products?api-version=1.0

but create the vendor, log like this:

[09:12:19 INF] Executing handler method XTC.BaaSo.VendorService.Web.Pages.Vendors.CreateModalModel.OnPostAsync - ModelState is Valid
[09:12:19 ERR] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "对不起,在处理你的请求期间,产生了一个服务器内部错误!",
  "details": null,
  "data": {},
  "validationErrors": null
}

[09:12:19 ERR] Could not found remote action for method: System.Threading.Tasks.Task`1[XTC.BaaSo.VendorService.Vendors.VendorDTO] CreateAsync(XTC.BaaSo.VendorService.Vendors.VendorCreateDTO) on the URL: https://localhost:44380

so i called the /api/vendor-service/vendors use swagger of WebGateway, select the VendorService definition, and i got right response. request:

curl -X 'POST' \
  'https://localhost:44361/api/vendor-service/vendors' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjBGREU3QzJGNDhDQjlGMEIzMUQ1NDVBRkVEOTdEQzU2RkJFODhBNEYiLCJ4NXQiOiJEOTU4TDBqTG53c3gxVVd2N1pmY1Z2dm9pazgiLCJ0eXAiOiJhdCtqd3QifQ.eyJzdWIiOiIzYTBkN2E5Yi1lYzM3LTkyM2EtZmI3MC1kNzMwMGJkN2JmYWMiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJhZG1pbiIsImVtYWlsIjoiYWRtaW5AYWJwLmlvIiwicm9sZSI6ImFkbWluIiwiZ2l2ZW5fbmFtZSI6ImFkbWluIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjoiRmFsc2UiLCJlbWFpbF92ZXJpZmllZCI6IkZhbHNlIiwidW5pcXVlX25hbWUiOiJhZG1pbiIsIm9pX3Byc3QiOiJXZWJHYXRld2F5X1N3YWdnZXIiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo0NDMwMC8iLCJvaV9hdV9pZCI6IjNhMGQ3YWM2LTJhYTctYjYzNC1mOWQ1LTVkYWJjYmFiZGU1OSIsImNsaWVudF9pZCI6IldlYkdhdGV3YXlfU3dhZ2dlciIsIm9pX3Rrbl9pZCI6IjNhMGQ3YWM2LTJiODQtYTAxNy1jZWZhLTM5M2M3YmI4NWY4MiIsImF1ZCI6IkJ1c2luZXNzVW5pdCIsInNjb3BlIjoiQnVzaW5lc3NVbml0IiwianRpIjoiYzIxYzZiYjAtMDdmMS00YmYzLWI0NzAtZTFjYzE4ZTcyYzBjIiwiZXhwIjoxNjkzOTc1NTkzLCJpYXQiOjE2OTM5NzE5OTN9.PS6Xhh6nNCTaSPUgcbxFoiStaUYCaAd2ZhjqgmaNdjLOSyxJMK3O147OmyibuQD9wepRzDeF2jgrFE0GaOrCiZfek6ceAJvA0OiF6rdgEBoqR-XXsPqnBFxX8EWqmb8zCXYbSks9ISvin3XEV0skLF9slS5ET4rntZpU1Mu6psP1jcKmHZSNalTmrkXD6bJtD5JwXef-JHxXCl4ygS0V1B_n-Fl4t8IfPB5VbStDfVxds-VzzxUDn2oSl3MID3SZOCQJ8otCUoGBeLKcN9x4zNT2VeGHxesFf2_T3iYytrfOkWiRwM8yT5UihrNq14wij5OOvf59gT7kXB_EkEkxzw' \
  -H 'Content-Type: application/json' \
  -H 'RequestVerificationToken: CfDJ8Fdcgn1lYTlCsW6eEpOaA4s_uqelPSN0IxCtuE8ANzKwx7JkcMAyqWbhFlthOb8YSSDcTUfC80W-_XAEhHWTtXgFYZxGzs4vFrHYeK4cYXOyYCpaxz1TmhLYysNJej40NnrtND8RbzLSEtV4fEqjGNnWnojawoE3ku7o6ry_NxewHMOXbScIYORK3Z6H90zZfA' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
  "name": "test",
  "display": "test1"
}'

response:

{
  "name": "test",
  "display": "test1",
  "isDeleted": false,
  "deleterId": null,
  "deletionTime": null,
  "lastModificationTime": null,
  "lastModifierId": null,
  "creationTime": "2023-09-06T11:46:50.1886199+08:00",
  "creatorId": "3a0d7a9b-ec37-923a-fb70-d7300bd7bfac",
  "id": "3a0d7ac6-6cb2-ed66-2de7-f138c7897eed",
  "extraProperties": {}
}

and i called the /api/vendor-service/vendors use curl, i got right response too.

request:

curl --location 'https://localhost:44380/api/vendor-service/vendors' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjBGREU3QzJGNDhDQjlGMEIzMUQ1NDVBRkVEOTdEQzU2RkJFODhBNEYiLCJ4NXQiOiJEOTU4TDBqTG53c3gxVVd2N1pmY1Z2dm9pazgiLCJ0eXAiOiJhdCtqd3QifQ.eyJzdWIiOiIzYTBkN2E5Yi1lYzM3LTkyM2EtZmI3MC1kNzMwMGJkN2JmYWMiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJhZG1pbiIsImVtYWlsIjoiYWRtaW5AYWJwLmlvIiwicm9sZSI6ImFkbWluIiwiZ2l2ZW5fbmFtZSI6ImFkbWluIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjoiRmFsc2UiLCJlbWFpbF92ZXJpZmllZCI6IkZhbHNlIiwidW5pcXVlX25hbWUiOiJhZG1pbiIsIm9pX3Byc3QiOiJXZWJHYXRld2F5X1N3YWdnZXIiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo0NDMwMC8iLCJvaV9hdV9pZCI6IjNhMGQ3YWM2LTJhYTctYjYzNC1mOWQ1LTVkYWJjYmFiZGU1OSIsImNsaWVudF9pZCI6IldlYkdhdGV3YXlfU3dhZ2dlciIsIm9pX3Rrbl9pZCI6IjNhMGQ3YWM2LTJiODQtYTAxNy1jZWZhLTM5M2M3YmI4NWY4MiIsImF1ZCI6IkJ1c2luZXNzVW5pdCIsInNjb3BlIjoiQnVzaW5lc3NVbml0IiwianRpIjoiYzIxYzZiYjAtMDdmMS00YmYzLWI0NzAtZTFjYzE4ZTcyYzBjIiwiZXhwIjoxNjkzOTc1NTkzLCJpYXQiOjE2OTM5NzE5OTN9.PS6Xhh6nNCTaSPUgcbxFoiStaUYCaAd2ZhjqgmaNdjLOSyxJMK3O147OmyibuQD9wepRzDeF2jgrFE0GaOrCiZfek6ceAJvA0OiF6rdgEBoqR-XXsPqnBFxX8EWqmb8zCXYbSks9ISvin3XEV0skLF9slS5ET4rntZpU1Mu6psP1jcKmHZSNalTmrkXD6bJtD5JwXef-JHxXCl4ygS0V1B_n-Fl4t8IfPB5VbStDfVxds-VzzxUDn2oSl3MID3SZOCQJ8otCUoGBeLKcN9x4zNT2VeGHxesFf2_T3iYytrfOkWiRwM8yT5UihrNq14wij5OOvf59gT7kXB_EkEkxzw' \
--data '{
  "name": "3",
  "display": "33333"
}'

response:

{
    "name": "3",
    "display": "33333",
    "isDeleted": false,
    "deleterId": null,
    "deletionTime": null,
    "lastModificationTime": null,
    "lastModifierId": null,
    "creationTime": "2023-09-06T11:56:52.4975455+08:00",
    "creatorId": "3a0d7a9b-ec37-923a-fb70-d7300bd7bfac",
    "id": "3a0d7acf-9d7e-0127-1efa-a46a51918906",
    "extraProperties": {}
}

so how can i resolve this error? thanks.

Showing 11 to 19 of 19 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.