Posted on 10/10/2024 12:44:49
Hey Jeppe,
Sorry for mixing 2 issues into 1 post.
The redirect 404 is unrelated, I think during deployment the config file caused the Friendly URL setting to change:
Checking the redirect option fixed it (altough it is still somwhat strange that a 404 is generated for a valid page ID)
The Management API issue seems to occur on a quite low level .NET operation, am I missing some sort of .NET update maybe?
It seems to be related to soemthing in my solition(s) as the error also occurs on my local machine, the error in the event viewer is:
Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
EventId: 1
SpanId: 15bd1d6a9ccd37f4
TraceId: 40b5be1eeba4e9c34a3398cedb7efc70
ParentId: 0000000000000000
RequestId: 40000253-0003-ff00-b63f-84710c7967bb
RequestPath: /Admin/UI/Settings/QueryListEdit
An unhandled exception has occurred while executing the request.
Exception:
System.InvalidOperationException: Unable to resolve instance of property type: System.String
at Dynamicweb.Application.UI.DynamicFields.QueryFieldProvider.GetFieldGroups()
at Dynamicweb.Application.UI.DynamicFields.QueryFieldProvider.GetFieldGroupCollection()
at Dynamicweb.Application.UI.DynamicFields.QueryFieldProvider.get_Collection()
at Dynamicweb.Application.UI.Models.QueryViewDataModel.FillDynamicFields()
at Dynamicweb.CoreUI.Data.ShadowEditing.ShadowEdit`1.GetModifiedModel()
at Dynamicweb.CoreUI.Screens.ScreenBuilders.EditScreenBuilder`2.Make()
at Dynamicweb.CoreUI.Screens.ScreenBuilder.MakeScreen(BuildRequest request)
at Dynamicweb.Management.UI.Controllers.AdminController.GetScreenFromDefinition(String screenDefinition, String shadowEditId)
at Dynamicweb.Management.UI.Controllers.AdminController.GetLayoutDefinition(String screenDefinition, String shadowEditId)
at Dynamicweb.Management.UI.Controllers.AdminController.GetScreen(String layout, String navigationPath, String shadowEditId)
at Dynamicweb.Management.UI.Controllers.AdminController.GetUI()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.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()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_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()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Dynamicweb.Management.UI.Middleware.AdminUIRedirectMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)