We are facing an issue while upgrading Infragistics.MVC.dll 2017 to 2022 version.
It looks like in the new version (2022), the content type should be “application/JSON” for all the AJAX POST requests (and obviously the data should be in a proper JSON format). But in our project, there are places where we make the AJAX POST with content type as “application/x-www-form-urlencoded” (data sent in the HTTP message body) and ended up getting the following error while using v2022 DLL - “unexpected character encountered while parsing value path line” while deserializing the input.
We haven’t faced this issue in v2017 DLL. So, I tried to compare the 2 DLLs and found that, there is a new condition specifically for POST requests to handle JSON content and that is what is causing this issue in v2022.
Is this something we have to change in our scripts to use “application/JSON” for all AJAX POST calls (or) is there another way to support form postings back to an IG method?
Hello,
Thank you for the provided information, for the screenshot and for the details about described behavior.
However, in order to ensure that the described scenario is addressed correctly, I will need some additional information regarding your scenario. Could you please answer the following questions:
This information is going to be highly appreciated and will help me in my further investigation determining whether the described behavior will be determined as an issue of the given control that must provide post requests of any type or the given control provides only json type request processing and may require subsequent modification of your custom request execution logic only from json type.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Thank you for your cooperation.
Regards,
Georgi Anastasov
Entry Level Software Developer
Infragistics
I couldn't upload the file as it was too big. See if you can access this link:
https://cedinc.box.com/s/hr2ecxejwzxyrzgtguj5adh4cd9nbt69
This sample has 2 buttons –
Basically, if the request content type is other than JSON, we are getting parse error while posting data to the controller. Hope this helps.
FYI – Refer Home/index.cshml for the sample