Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller with IList<T> model validation exception #240

Closed
i4004 opened this issue Nov 6, 2023 · 0 comments
Closed

Controller with IList<T> model validation exception #240

i4004 opened this issue Nov 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@i4004
Copy link
Member

i4004 commented Nov 6, 2023

Actual behavior

When validating a controller with IList model type I get the exception:

System.Reflection.TargetParameterCountException : Parameter count mismatch.
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Simplify.Web.Model.Validation.ValidationAttributesExecutor.Validate(Type type, Object value, IDIResolver resolver)
at Simplify.Web.Model.HttpModelHandler.Validate[T](ModelBinderEventArgs`1 args, IDIResolver resolver)
at Simplify.Web.Model.HttpModelHandler.ProcessAsync[T](IDIResolver resolver)
at Simplify.Web.AsyncController`1.ReadModelAsync()
at TesterApp.Controllers.Api.v1.TestInIListController.Invoke() in D:\Projects\SimplifyNet\Simplify.Web.Json\src\TesterApp\Controllers\Api\v1\TestInIListController.cs:line 15
at Simplify.Web.Core.Controllers.Execution.ControllerExecutor.Execute(IControllerMetaData controllerMetaData, IDIResolver resolver, HttpContext context, Object routeParameters)
at CallSite.Target(Closure , CallSite , Object )
at Simplify.Web.Core.Controllers.ControllersProcessor.ProcessController(IControllerMetaData controllerType, IDIResolver resolver, HttpContext context, Object routeParameters)
at CallSite.Target(Closure , CallSite , Object )
at Simplify.Web.Core.Controllers.ControllersProcessor.ProcessControllers(IDIResolver resolver, HttpContext context)
at Simplify.Web.Core.Controllers.ControllersRequestHandler.ProcessRequest(IDIResolver resolver, HttpContext context)
at Simplify.Web.RequestPipeline.SimplifyWebRequestMiddleware.Invoke(HttpContext context)

Expected behavior

No exceptions

@i4004 i4004 added the bug Something isn't working label Nov 6, 2023
@github-project-automation github-project-automation bot moved this to New Issues in Simplify Issues Nov 6, 2023
@i4004 i4004 moved this from New Issues to Backlog in Simplify Issues Nov 6, 2023
@i4004 i4004 moved this from Backlog to In Progress in Simplify Issues Nov 6, 2023
i4004 added a commit that referenced this issue Nov 6, 2023
i4004 added a commit that referenced this issue Nov 7, 2023
@i4004 i4004 moved this from In Progress to Resolved in Simplify Issues Nov 7, 2023
@i4004 i4004 moved this from Resolved to Review/QA in Simplify Issues Nov 7, 2023
@i4004 i4004 moved this from Review/QA to Done in Simplify Issues Nov 7, 2023
@i4004 i4004 moved this from Done to Closed in Simplify Issues Nov 7, 2023
@i4004 i4004 closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Closed
Development

No branches or pull requests

1 participant