Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1175
Migration from 2017 to 2022 - Mvc dll
posted

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?

Parents
  • 440
    Offline posted

    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:

    • Exactly which control or controls are you using from the provided Infragistics Ignite UI jQuery controls?
    • How do you implement your POST requests and what is the custom logic behind them?
    • Could you provide more information about your application and logic also about using the given control or controls and how they perform the given ajax
    • Could you provide screenshots, code snippets or in best case an isolated sample with steps to reproduce the described behavior.

    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

  • 1175
    Offline posted in reply to Georgi Anastasov

    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 –

     

    • AJAX Post 1 – This will post some data to the controller action method (with GridDataSourceAction annotation) and request content type as “application/x-www-form-urlencoded”. While using this, we are running into an error “Unexpected character encountered while parsing value”

     

     

    • AJAX Post 2 – This will post some data to the controller action method (with GridDataSourceAction annotation) and request content type as “application/json” and it works fine

     

     

    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

Reply Children
No Data