Developer forum

Forum » Dynamicweb 10 » Management API Queries raising exception

Management API Queries raising exception

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Hi, 

I updated to 10.8.2 on several solutions, each one of them raises an exception when trying to look at any query in the API explorer. Commands do seem to work:


An issue that might be caused by this as well (wild guess) is that any page that is linked by ID instead of path does not work anymore, for example this results in 404:
https://solutionname/Default.aspx?ID=509&LoginAction=Recovery 


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Justin,

I don't get that error locally, so I'd need some more information to determine what's going on here.

Can you check the event log and show me the error from there? It should show more information.

- Jeppe

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

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)

 

 

 

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Justin,

This is a known bug that has been fixed. It should be out with the next 10.8 release.

Bug number: #21429

- Jeppe

 

You must be logged in to post in the forum