Attività di "Tony_Albutt"

I have replaced the abp-paginator with two buttons, PageBackButton and PageNextButton.

All except one thing is working.

If I am on the original page that opens, then the close button works and the normal close after OnPost works.

Once I navigate to Page 2, I can no longer close the modal page, with clicking the [x] button and OnPost response. I suspect that the modal abp.manager does not recognise the modal form

To fix the OnPost problem, I now submit the form via ajax and reload page on success, which is not the preferred method to close a modal popup.

How can I get the close button to work without reloading the page?

<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">×</span></button>

Thanks and regards Tony

Thanks, I will do so

I have closed this request.

Have a good one

Regards Tony

  • ABP Framework version: v4.3.3

  • UI type: MVCr

  • DB provider: EF CoreB

  • Tiered (MVC): yes

  • Exception message and stack trace:

  • Returned 500 error

  • Below is from the loge file.

  • 2021-08-03 15:05:09.606 +02:00 [INF] Executed page /TravelRequests/Details in 1867.9162ms 2021-08-03 15:05:09.606 +02:00 [INF] Executed endpoint '/TravelRequests/Details' 2021-08-03 15:05:09.607 +02:00 [ERR] An unhandled exception has occurred while executing the request. System.InvalidOperationException: The view 'Components/TravelCostsWidget/Default' was not found. The following locations were searched: /Pages/TravelRequests/Components/TravelCostsWidget/Default.en.cshtml /Pages/TravelRequests/Components/TravelCostsWidget/Default.cshtml /Pages/Components/TravelCostsWidget/Default.en.cshtml /Pages/Components/TravelCostsWidget/Default.cshtml /Pages/Shared/Components/TravelCostsWidget/Default.en.cshtml /Pages/Shared/Components/TravelCostsWidget/Default.cshtml /Views/Shared/Components/TravelCostsWidget/Default.en.cshtml /Views/Shared/Components/TravelCostsWidget/Default.cshtml at Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(IEnumerable1 originalLocations) at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(ViewComponentContext context) at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context) at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, Object arguments) at Volo.Abp.AspNetCore.Mvc.UI.Widgets.AbpViewComponentHelper.InvokeWidgetAsync(Object arguments, WidgetDefinition widget) at Volo.Abp.AspNetCore.Mvc.UI.Widgets.AbpViewComponentHelper.InvokeAsync(String name, Object arguments) at AspNetCore.Pages_TravelRequests_Details.<ExecuteAsync>b__94_132() in C:\Users\Anthony\source\repos\ITX_New\ITX\aspnet-core\src\ITX.Web\Pages\TravelRequests\Details.cshtml:line 444 at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(Boolean useCachedResult, HtmlEncoder encoder) at Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab.AbpTabTagHelperService.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AspNetCore.Pages_TravelRequests_Details.<ExecuteAsync>b__94_51() at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(Boolean useCachedResult, HtmlEncoder encoder) at Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab.AbpTabDropdownTagHelperService.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AspNetCore.Pages_TravelRequests_Details.<ExecuteAsync>b__94_45() at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(Boolean useCachedResult, HtmlEncoder encoder) at Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab.AbpTabsTagHelperService.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AspNetCore.Pages_TravelRequests_Details.<ExecuteAsync>b__94_3() at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync() at AspNetCore.Pages_TravelRequests_Details.ExecuteAsync() in C:\Users\Anthony\source\repos\ITX_New\ITX\aspnet-core\src\ITX.Web\Pages\TravelRequests\Details.cshtml:line 22 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable1 statusCode) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeResultFilters>g__Awaited|27_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) 2021-08-03 15:05:09.616 +02:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2021-08-03 15:05:09.616 +02:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2021-08-03 15:05:09.617 +02:00 [INF] Executing ViewResult, running view ~/Views/Error/500.cshtml. 2021-08-03 15:05:09.628 +02:00 [INF] Bundling __bundles/A28A764CBD2BA2A0A12B2E84D0BBCF6E.0C4EDBE702C62503400CDB0114F9D00A.css (2 files) 2021-08-03 15:05:09.635 +02:00 [INF] > Minified /Pages/Shared/Components/css/Default.css (10010 bytes -> 6559 bytes) 2021-08-03 15:05:09.639 +02:00 [INF] > Minified /Pages/Shared/Components/TravelCostsWidget/Default.css (799 bytes -> 470 bytes) 2021-08-03 15:05:09.639 +02:00 [INF] Bundled __bundles/A28A764CBD2BA2A0A12B2E84D0BBCF6E.0C4EDBE702C62503400CDB0114F9D00A.css (7029 bytes)

  • Steps to reproduce the issue:"

  • Create a widget and add it to a details page.

  • Works in debug mode

  • Does not work when deployed to local IIS server not a hosted server.

  • Code to follow

This is the widget location /Pages/Shared/Components/TravelCostsWidget/Default.cshtml The same location that is reported in the log file above indicating could not be found

	TravelRequests/Details.schtml
    <form method="get" id="TravelCostsFilterForm">
                    <abp-input asp-for="TravelRequestId" />
                    <abp-row>
                        <div class="row" style="padding-left:24px;padding-bottom:12px;">
                            <abp-button style="float: right;" id="RefreshTravelCostsButton"
                                        text="@L["Refresh"].Value"
                                        icon="refresh"
                                        button-type="Primary"
                                        type="Submit" />
                        </div>
                    </abp-row>
                </form>
                <div id="TravelCostsWidgetArea" data-widget-filter="#TravelCostsFilterForm">
                    @await Component.InvokeAsync("TravelCostsWidget", new { travelRequestId = Model.TravelRequestId })
                </div>

	TravelCostsWidgetController.cs	
    namespace ITX.Web.Pages.Shared.Components.TravelCostsWidget
		{
		    [Route("TravelRequests/Widgets")]
		    public class TravelCostsWidgetController : AbpController
		    {
		
		        [HttpGet]
		        [Route("RefreshTravelCosts")]
		        public IActionResult RefreshTravelCosts(Guid travelRequestId)
		        {
		            return ViewComponent("TravelCostsWidget", new { travelRequestId });
		        }
		    }
		}
        
        
	TravelCostsViewModel.cs	
    namespace ITX.Web.Pages.Shared.Components.TravelCosts
		{
		    public class TravelCostsViewModel
		    {
		        public List<TravelCostDto> TravelCosts { get; set; }
		    }
		}
	
    
    TravelCostsWidgetViewComponent.cs	
    namespace ITX.Web.Pages.Shared.Components.TravelCosts
		{
		    [Widget(
		    StyleFiles = new[] { "/Pages/Shared/Components/TravelCostsWidget/Default.css" },
		    ScriptFiles = new[] { "/Pages/Shared/Components/TravelCostsWidget/Default.js" },
		    RefreshUrl = "Widgets/RefreshTravelCosts",
		    AutoInitialize = true
		    )]
		    public class TravelCostsWidgetViewComponent : AbpViewComponent
		    {
		        private readonly ITravelCostsAppService _travelCostsAppService;
		
		        public TravelCostsWidgetViewComponent(ITravelCostsAppService travelCostsAppService)
		        {
		            _travelCostsAppService = travelCostsAppService;
		        }
		
		        public IViewComponentResult Invoke(Guid travelRequestId)
		        {
                    List<TravelCostDto> travelCosts = new();
                    if (travelRequestId != Guid.Empty)
                    {
                        travelCosts = _travelCostsAppService.GetTravelCostsForTravelRequest(travelRequestId);
                    }
                    return View(new TravelCostsViewModel { TravelCosts = travelCosts });
		        }
		    }
		}
	
    
    Default.js	
    $(function () {
		    var myWidgetManager = new abp.WidgetManager('#TravelCostsWidgetArea');
		    myWidgetManager.init();
		})
	
    
    Default.cshtml	
    @using System.Globalization
		@using ITX.Localization
		@using Microsoft.AspNetCore.Mvc.Localization
		@model ITX.Web.Pages.Shared.Components.TravelCosts.TravelCostsViewModel
		@inject IHtmlLocalizer<ITXResource> L
		@{
		    decimal Total = 0.00m;
		
		}
		
		<table class="table table-striped">
		    <thead>
		        <tr class="line">
		            <td><strong>#</strong></td>
		            <td class="text-left"><strong>@L["Description"]</strong></td>
		            <td class="text-center"><strong>@L["Qty"]</strong></td>
		            <td class="text-right"><strong>@L["Price"]</strong></td>
		            <td class="text-right"><strong>@L["Total"]</strong></td>
		        </tr>
		    </thead>
		    <tbody>
		        @foreach (var item in Model.TravelCosts)
		        {
		            <tr>
		                <td>@item.ItemNumber</td>
		                <td class="text-left">@item.Description</td>
		                <td class="text-center">@item.Qty</td>
		                <td class="text-center">@item.Price</td>
		                <td class="text-right">@item.Total</td>
		            </tr>
		            {
		                Total = Total + item.Total;
		            }
		        }
		            <tr>
		                <td colspan="3">
		                </td>
		                <td class="text-right"><strong>Total</strong></td>
		                <td class="text-right"><strong>@Total</strong></td>
		            </tr>
		        </tbody>
		</table>

I may have found a problem. First widget is longer reporting an error. Next one is still reporting a problem

Solution for first problem is as follows

  1. Widget folder is TravelCostsWidget.
  2. Controller name space is namespace ITX.Web.Pages.Shared.Components.TravelCostsWidget
  3. ViewComponent name space is ITX.Web.Pages.Shared.Components.TravelCosts
  4. ViewModel name space is TX.Web.Pages.Shared.Components.TravelCosts

Solved first Widget error by renaming name space from TravelCosts to TravelCostsWidget

I will update again later

All widgets are now working. The second widget had the same problem, but kept reporting the error. Deleted widget and re-created, and still reported the problem. Remed out all UI on Default.chtml and then workerd. Re-enabled UI and then worked ??? A referance may have been cached someware.

All good

Thanks

I want to have a user called System-Notifications. I want to use the Chat module to display notifications to users, and will contain a link to a task that they need to perform. What is the recommended method to use, so that I can send Chat notifications to users from within a Background Job?

Below, I have tested the conversationAppService.SendMessageAsync , and works from a web page calling an AppService method This does not work when I impersonate a user. How would I correct this?

I am unable to send a chat message using conversationAppService.SendMessageAsync when impersonating a user : using (_currentPrincipalAccessor.Change(newPrincipal)) I get an exception "Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown" when impersonating, although the impersonated CurrentUser.IsAuthenticated == true

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.4.4
  • UI type: **MVC **
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown. **** below for the stack trace
  • Steps to reproduce the issue: This code rases the exception.
  • using (_currentPrincipalAccessor.Change(newPrincipal)) { var userName = CurrentUser.UserName; //See below **ii for contents await _conversationAppService.SendMessageAsync( // This is where the exception is triggered new SendMessageInput { TargetUserId = targetUserId, Message = args.Message, } ); }
  • * See below for the full code.

The purpose of the code is so that I can use the Chat module for In-App Notifications from a BackgroundJob

When I test from a web page calling an AppService, I can send the message as a logged in user using CurrentUser When I impersonate using currentPrincipalAccessor , I get an Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.

* See below for my code.

    public async Task SendNotify(NotifyArgs args)
    {
        try
        {

            Guid.TryParse("54e53b63-14be-4e22-5a0b-39fe42671983", out var targetUserId);
            Guid.TryParse("5e328781-65e6-5d29-e83d-39fe195a5a22", out var senderUserId);

            //// Sends a SignalR message, does not save to DB, but works if the user is looking at the page
            //var chatMessage = new ChatMessageRdto()
            //{
            //    SenderUserId = senderUserId,
            //    SenderUsername = "user1@mail.com",
            //    SenderName = "User",
            //    SenderSurname = "One",
            //    Text = args.Message
            //};
            //await _realTimeChatMessageSender.SendAsync(targetUserId, chatMessage);

            //Sends a message and saves to DB
            var realUser = CurrentUser; //See below ** for content of CurrentUser
            var realUserName = CurrentUser.UserName; //returns "john"
            await _conversationAppService.SendMessageAsync(
               new SendMessageInput
               {
                   TargetUserId = targetUserId,
                   Message = args.Message,
               }
            );

            var newPrincipal = new ClaimsPrincipal(
                                    new ClaimsIdentity(
                                        new Claim[]
                                        {
                                                new Claim(AbpClaimTypes.TenantId, CurrentUser.TenantId.ToString()),
                                                new Claim(AbpClaimTypes.UserId, CurrentUser.Id.ToString()),
                                                new Claim(AbpClaimTypes.ImpersonatorTenantId, CurrentUser.TenantId.ToString()),
                                                new Claim(AbpClaimTypes.ImpersonatorUserId, "3e1c2476-ad49-85c7-9101-39fe18cffd26"),
                                                new Claim(AbpClaimTypes.Email, "user1@mail.com"),
                                                new Claim(AbpClaimTypes.UserName, "user1@mail.com"),
                                                new Claim(AbpClaimTypes.Name, "User"),
                                                new Claim(AbpClaimTypes.SurName, "One"),
                                                new Claim(AbpClaimTypes.Role, "Traveller")
                                        }
                                    )
                                );

            using (_currentPrincipalAccessor.Change(newPrincipal))
            {
                var userName = CurrentUser.UserName; //See below *** for content of CurrentUser
                await _conversationAppService.SendMessageAsync( // This is where the exception is triggered
                   new SendMessageInput
                   {
                       TargetUserId = targetUserId,
                       Message = args.Message,
                   }
               );
            }

        }
        catch (Exception ex)
        {
            //throw;
        }

    }

** realUser = CurrentUser

*** CurrentUser = newPrincipal

**** Exception message and stack trace

  • ABP Framework version: v4.4.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: Can't compile, see two types of errors below
  • Steps to reproduce the issue:" Upgrade from version 4.4.0 to 5.14

I have been having problems upgrading to version 5.x from 4.4 for some time now... I want to view some source code in the demo, to verify that you have not introduced some breaking changes Please enable access to my account to view source code of samples.

I am getting the following two types of errors in 350+ places after updating. to version 5.1.4 and dot net core 6

All was working before version 5.x

Sample IQueryable error
CODE:

        private int GetNextLineNumber(Guid TravelRequestId)
        {
            var LastLine = _expenseItemRepository.Where(p => p.TravelRequestId == TravelRequestId).Max(p => (int?)p.Line);
            return LastLine == null ? 1 : (int)LastLine + 1;
        }

Error: Severity Code Description Project File Line Suppression State Error CS1929 'IExpenseItemRepository' does not contain a definition for 'Where' and the best extension method overload 'DynamicQueryableExtensions.Where(IQueryable, string, params object[])' requires a receiver of type 'IQueryable' ITX.Application C:\Users\Anthony\source\repos\ITX_New\ITX\aspnet-core\src\ITX.Application\ExpenseItems\ExpenseItemAppService.cs 228 Active

Sample IEnumerable error - CODE:

        public virtual async Task<PagedResultDto<LookupDto<Guid>>> GetEmployeeLookupAsync(LookupRequestDto input)
        {
            var query = _employeeRepository.AsQueryable()
                .WhereIf(!string.IsNullOrWhiteSpace(input.Filter),
                    x => x.FullName != null &&
                         x.FullName.Contains(input.Filter));
            var lookupData = await query.PageBy(input.SkipCount, input.MaxResultCount).ToDynamicListAsync<Employee>();
            var totalCount = query.Count();
            return new PagedResultDto<LookupDto<Guid>>
            {
                TotalCount = totalCount,
                Items = ObjectMapper.Map<List<Employee>, List<LookupDto<Guid>>>(lookupData)
            };
        }

Severity Code Description Project File Line Suppression State Error CS1929 'IRepository<Employee, Guid>' does not contain a definition for 'AsQueryable' and the best extension method overload 'Queryable.AsQueryable(IEnumerable)' requires a receiver of type 'IEnumerable' ITX.Application C:\Users\Anthony\source\repos\ITX_New\ITX\aspnet-core\src\ITX.Application\ExpenseItems\ExpenseItemAppService.cs 169 Active

I have made 1800+ changes to my code to fix the breaking changes as below e.g. var queryable = await _employeeRepository.GetQueryableAsync();

        public virtual async Task<PagedResultDto<LookupDto<Guid>>> GetEmployeeLookupAsync(LookupRequestDto input)
        {
            IQueryable<Employee> queryable = await _employeeRepository.GetQueryableAsync();
            var query = queryable
                .WhereIf(!string.IsNullOrWhiteSpace(input.Filter),
                    x => x.FullName != null &&
                         x.FullName.Contains(input.Filter));
            var lookupData = await query.PageBy(input.SkipCount, input.MaxResultCount).ToDynamicListAsync<Employee>();
            var totalCount = query.Count();
            return new PagedResultDto<LookupDto<Guid>>
            {
                TotalCount = totalCount,
                Items = ObjectMapper.Map<List<Employee>, List<LookupDto<Guid>>>(lookupData)
            };
        }

The application now compiles, but does not run

I re-added the Account and the Lepton Theme modules. This did not work as the ABP Suite application added a Angular folder with the two modules.

I am getting the below error when running the application

[17:17:51 INF] Starting web host. [17:17:52 FTL] Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during ConfigureServices phase of the module Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule, Volo.Abp.AspNetCore.Mvc, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Could not load type 'Volo.Abp.Identity.ProfileDto' from assembly 'Volo.Abp.Identity.Pro.Application.Contracts, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not load type 'Volo.Abp.Identity.ProfileDto' from assembly 'Volo.Abp.Identity.Pro.Application.Contracts, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'.

More info on error

Exception thrown: 'System.Reflection.ReflectionTypeLoadException' in System.Private.CoreLib.dll Exception thrown: 'Volo.Abp.AbpInitializationException' in Volo.Abp.Core.dll 'ITX.Web.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.2\System.Reflection.Metadata.dll'. The thread 0x6964 has exited with code 0 (0x0). The thread 0x5790 has exited with code 0 (0x0). The program '[33564] ITX.Web.exe' has exited with code 1 (0x1).

Are you able to help?

Thanks and regards Tony

This was one of the problems.

Restored packages, added migrations and updated database as well.

I am still having the same error.

I found the Volo Account and Lepton modules in new location

After replacing all files for account and implementing my changes, and replacing all Version="$(MicrosoftPackageVersion)" with correct version, I how get the application to run and the web browser to display the Lepton theme errors to display the bootstrap5 errors.

Next step is to move lepton module file and re-implement my custom theme.

Working again Custom themes are a bust. Will have to re-create them

11 - 20 di 52
Made with ❤️ on ABP v8.2.0-preview Updated on marzo 25, 2024, 15:11