Expection Property set method not found when binding json body from GET
drgrieve opened this issue · 0 comments
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