diff --git a/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs b/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs index bea107117..c9b84b2ee 100644 --- a/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs +++ b/src/Microsoft.AspNetCore.OData/Formatter/ODataInputFormatter.cs @@ -202,6 +202,7 @@ internal static async Task ReadFromStreamAsync( oDataReaderSettings.BaseUri = baseAddress; oDataReaderSettings.Validations = oDataReaderSettings.Validations & ~ValidationKinds.ThrowOnUndeclaredPropertyForNonOpenType; oDataReaderSettings.Version = version; + oDataReaderSettings.MaxProtocolVersion = version; IODataRequestMessage oDataRequestMessage = ODataMessageWrapperHelper.Create(new StreamWrapper(request.Body), request.Headers, request.GetODataContentIdMapping(), request.GetRouteServices());