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

Expection Property set method not found when binding json body from GET #54

Open
drgrieve opened this issue Apr 12, 2021 · 0 comments
Open

Comments

@drgrieve
Copy link

Workaround on model use [HybridBindClass(defaultBindingOrder: new[] { Source.QueryString })] to disable JSON body binding on GET request. Querystring binding works as expected.

Expected: GET requests shouldn't have bodies submitted and if they do ignore the request or if you want to process them then not crash

Version .18

STACK: at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)\r\n at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)\r\n at HybridModelBinding.HybridModelBinder.BindModelAsync(ModelBindingContext bindingContext)\r\n at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)\r\n at Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant