Activities of "LawrenceKwan"

I saw your DDD Ebook and find there should be XXXXX.EntityFrameworkCore.DbMigrations file. I have created EntityFrameworkCore datebase project but only have XXXXX.DbMigrator and dont contain XXXXX.EntityFrameworkCore.DbMigrations.

Is it normal?

  • ABP Framework version: v4.4.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hello @LawrenceKwan

You can learn more about customizing pages with following documentation: https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface


You can place following page into your project to replacement

Create following class into exact path under your Web project:

  • Pages/Public/CmsKit/Pages/Index.cshtml.cs
 public class MyIndexModel : CommonPageModel 
{ 
    [BindProperty(SupportsGet = true)]  
    public string Slug { get; set; } 
 
    protected IPagePublicAppService PagePublicAppService { get; } 
 
    public PageDto Page { get; set; } 
 
    public string YourParameter { get; set; } 
 
    public IndexModel(IPagePublicAppService pagePublicAppService) 
    { 
        PagePublicAppService = pagePublicAppService; 
    } 
 
    public async Task<IActionResult> OnGetAsync() 
    { 
        Page = await PagePublicAppService.FindBySlugAsync(Slug); 
 
        YourParameter = "Some result from request"; 
         
        if (Page == null) 
        { 
            return NotFound(); 
        } 
 
        return Page(); 
    } 
} 

Then add following page into exact path under your Web project:

  • Pages/Public/CmsKit/Pages/Index.cshtml
@page 
@using Microsoft.AspNetCore.Mvc.Localization 
@using Volo.CmsKit.Localization 
@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages 
 
@* ** Don't forget to Update Model from here: ** *@ 
@model MyIndexModel 
 
@inject IHtmlLocalizer<CmsKitResource> L 
 
@section styles{ 
     
    <abp-style src="/Pages/Public/CmsKit/Pages/index.css" /> 
 
    <style> 
        @Html.Raw(Model.Page.Style) 
    </style> 
} 
 
@section scripts{ 
    <script> 
        @Html.Raw(Model.Page.Script) 
    </script> 
} 
 
@* ** You can render anything before or after page content ** *@ 
<h1>@Model.YourParameter</h1> 
 
@await Component.InvokeAsync(typeof(DefaultPageViewComponent), 
    new 
    { 
        pageId = Model.Page.Id, 
        title = Model.Page.Title, 
        content = Model.Page.Content 
    }) 

Hi thanks for your reply. I am stuck because I cannot see the module index pages. Here are my project structure and cannot find your CmskitIndex.cs page (Pages/Public/CmsKit/Pages/Index.cshtml.cs)

I am sure I have install my CMSKit module:

If I dont have the source code, I afraid I cannot do the above Customize Page ? I am right now doing proof of concept of the project, only can upgrade ABP commercial lisence after PoC is done. Are there any way to do Customize Page without source code?(with nuget only)

Question

Hello All

I have create new menu list by CMS kit module and want to integrate customize page with abp commercial. As I am integrating other system with abp commercial, how to make customize page with calling http request on C# and show returned viewbag on web. Any related document on this? thanks.

  • ABP Framework version: v4.4.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
Answer

Hi @LawrenceKwan, do you use the Redis? It can be really helpful to downgrade the response time.

Sure, I have set up redis server by docker and connect well.

2021-11-11 14:09:54.396 +08:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule 2021-11-11 14:09:54.396 +08:00 [INF] - Volo.Abp.Caching.StackExchangeRedis.AbpCachingStackExchangeRedisModule 2021-11-11 14:09:54.396 +08:00 [INF] - Volo.Abp.Caching.AbpCachingModule

2021-11-11 14:09:55.549 +08:00 [DBG] Executing HealthCheck collector HostedService. 2021-11-11 14:09:55.559 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44392/ - - 2021-11-11 14:09:55.565 +08:00 [INF] Entity Framework Core 5.0.12 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 2021-11-11 14:09:55.607 +08:00 [INF] Start processing HTTP request GET "https://localhost:44392/health-status" 2021-11-11 14:09:55.608 +08:00 [INF] Sending HTTP request GET "https://localhost:44392/health-status" 2021-11-11 14:09:55.678 +08:00 [INF] Application started. Press Ctrl+C to shut down. 2021-11-11 14:09:55.678 +08:00 [INF] Hosting environment: Development 2021-11-11 14:09:55.679 +08:00 [INF] Content root path: d:\Users\lk2555\ABPApplication\ABPApplication\aspnet-core\src\ABPApplication.HttpApi.Host 2021-11-11 14:09:55.788 +08:00 [INF] Request starting HTTP/1.1 GET https://localhost:44392/health-status - - 2021-11-11 14:09:57.029 +08:00 [INF] Executing endpoint 'ABPApplication.Controllers.HomeController.Index (ABPApplication.HttpApi.Host)' 2021-11-11 14:09:57.029 +08:00 [INF] Executing endpoint 'Health checks' 2021-11-11 14:09:57.072 +08:00 [INF] Route matched with {action = "Index", controller = "Home", area = "", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult Index() on controller ABPApplication.Controllers.HomeController (ABPApplication.HttpApi.Host). 2021-11-11 14:09:57.095 +08:00 [INF] Executing RedirectResult, redirecting to /swagger. 2021-11-11 14:09:57.099 +08:00 [INF] Executed action ABPApplication.Controllers.HomeController.Index (ABPApplication.HttpApi.Host) in 23.162ms 2021-11-11 14:09:57.100 +08:00 [INF] Executed endpoint 'ABPApplication.Controllers.HomeController.Index (ABPApplication.HttpApi.Host)' 2021-11-11 14:09:57.124 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44392/ - - - 302 - - 1566.6727ms 2021-11-11 14:09:57.126 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44392/swagger/index.html - - 2021-11-11 14:09:57.199 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44392/swagger/index.html - - - 200 - text/html;charset=utf-8 73.1779ms

Answer

Hi @LawrenceKwan, do you use the Redis? It can be really helpful to downgrade the response time.

Yes, I have redis sever now, the project run sucess.

identity server connect redis then connect other 2021-11-11 14:09:51.824 +08:00 [INF] - Volo.Abp.Caching.StackExchangeRedis.AbpCachingStackExchangeRedisModule ........ 2021-11-11 14:09:51.964 +08:00 [DBG] Started background worker: Volo.Abp.IdentityServer.Tokens.TokenCleanupBackgroundWorker 2021-11-11 14:09:52.147 +08:00 [INF] Starting IdentityServer4 version 4.1.1+cebd52f5bc61bdefc262fd20739d4d087c6f961f 2021-11-11 14:09:52.793 +08:00 [INF] Using the default authentication scheme Identity.Application for IdentityServer 2021-11-11 14:09:52.793 +08:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for authentication 2021-11-11 14:09:52.793 +08:00 [DBG] Using Identity.External as default ASP.NET Core scheme for sign-in 2021-11-11 14:09:52.793 +08:00 [DBG] Using Identity.External as default ASP.NET Core scheme for sign-out 2021-11-11 14:09:52.793 +08:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for challenge 2021-11-11 14:09:52.793 +08:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for forbid 2021-11-11 14:09:53.347 +08:00 [INF] Initialized all ABP modules. 2021-11-11 14:09:53.370 +08:00 [INF] Application started. Press Ctrl+C to shut down. 2021-11-11 14:09:53.371 +08:00 [INF] Hosting environment: Development 2021-11-11 14:09:53.371 +08:00 [INF] Content root path: d:\Users\lk2555\ABPApplication\ABPApplication\aspnet-core\src\ABPApplication.IdentityServer 2021-11-11 14:09:53.389 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44383/ - - 2021-11-11 14:09:55.602 +08:00 [DBG] Login Url: /Account/Login 2021-11-11 14:09:55.602 +08:00 [DBG] Login Return Url Parameter: ReturnUrl 2021-11-11 14:09:55.602 +08:00 [DBG] Logout Url: /Account/Logout 2021-11-11 14:09:55.602 +08:00 [DBG] ConsentUrl Url: /Consent 2021-11-11 14:09:55.602 +08:00 [DBG] Consent Return Url Parameter: returnUrl 2021-11-11 14:09:55.602 +08:00 [DBG] Error Url: /Account/Error 2021-11-11 14:09:55.602 +08:00 [DBG] Error Id Parameter: errorId 2021-11-11 14:09:56.667 +08:00 [INF] Executing endpoint '/Index' 2021-11-11 14:09:56.707 +08:00 [INF] Route matched with {page = "/Index", area = "", action = "", controller = ""}. Executing page /Index 2021-11-11 14:09:56.709 +08:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2021-11-11 14:09:56.730 +08:00 [INF] Executing handler method ABPApplication.Pages.IndexModel.OnGet - ModelState is "Valid" 2021-11-11 14:09:56.731 +08:00 [INF] Executed handler method OnGet, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult. 2021-11-11 14:09:57.148 +08:00 [DBG] Added bundle 'Lepton.Global' to the page in 31.79 ms. 2021-11-11 14:09:57.408 +08:00 [DBG] Added bundle 'Lepton.Global' to the page in 17.96 ms. 2021-11-11 14:09:57.438 +08:00 [INF] Executed page /Index in 728.1847ms 2021-11-11 14:09:57.439 +08:00 [INF] Executed endpoint '/Index' 2021-11-11 14:09:57.473 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44383/ - - - 200 - text/html;+charset=utf-8 4083.9085ms

the menu page need at least 30+ second to loading, is it mornal?

Question

Hello All

I find that It is very slow for build and run the abp commercial project. Is it running slow too on localhost? anyway to improve it?Wait up to minutes to add a new menu or page, showing up the page is slow too.

  • ABP Framework version: v4.4.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

After I add redis server , every thing is okay Thanks EngincanV.

EngincanV Thanks for update.

I do reserch on abp commercial document web https://docs.abp.io/en/commercial/latest Dont find any requisition before running ABP commercial and we at the moment dont have redis server in our system arthecture. As I am doing proof of concept for web module, could I disable redis now ? Or I must set up a redis server?

The HTTP 500 Error has been fix, is because of database connection string issue.

And I find the below logs:

2021-11-10 15:04:33.576 +08:00 [WRN] It was not possible to connect to the redis server(s). UnableToConnect on 127.0.0.1:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 1s ago, last-write: 1s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 189s ago, v: 2.0.593.37019 StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s). UnableToConnect on 127.0.0.1:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 1s ago, last-write: 1s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 189s ago, v: 2.0.593.37019 at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Object configuration, TextWriter log) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 941 at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 903 at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Connect() at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Set(String key, Byte[] value, DistributedCacheEntryOptions options) at Volo.Abp.Caching.DistributedCache`2.<>c__DisplayClass50_0.

** if it need to host redis server myself?**

After I have start abp commercial soulution, I get 3 tab open, only the swagger show properly, and other 2 are showing error. See this :

ABPApplication.HttpApi.Host = > swagger tab ABPApplication.IdentityServer = > 500 server error tab ABPApplication.Web => An unhandled exception

Anything I need to set up for IdentityServer? I have already input the connection string.

Showing 41 to 50 of 54 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11