none
APIController .net framework 4.6.1 to .net framework 4.7 RRS feed

  • Question

  • Hi,

    We converted our APIs from 4.6.1 to 4.7.

    We were using the following settings in our web.config to allow certain characters in url parmeters.

    <httpRuntime targetFramework="4.6.1" relaxedUrlToFileSystemMapping="true" requestValidationMode="2.0" requestPathInvalidCharacters="" />

     <requestFiltering allowDoubleEscaping="true" />

    I am using Uri.EscapeDataString(arg.ToString()) to escape special characters.

    These settings appear to be not working anymore after we converted from 4.6.1 to 4.7.

    If I send https://localhost/Gateway/api/users/%2567/patients, it decodes it and shows as https://localhost/Gateway/api/users/g/patients.

    If I send https://localhost/Gateway/api/users/%2512/patients, it shows as https://localhost/Gateway/api/users/%12/patients

    Is there a way to fix this? What are the recommendations?

    Thanks



    Friday, March 1, 2019 4:17 PM

All replies

  • Hi,

    Welcome to MSDN forum.

    Did you get any error after you converted from 4.6.1 to 4.7?

    Please try to clean and rebuild your project. If you retarget a project to a different version of the .NET Framework, your references may not resolve properly in some cases. Please check if you have any references error, you can remove the references that do not resolve and then adding them back to the project.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 4, 2019 10:16 AM
  • I cleaned and rebuild my project. I do not see any reference error or warnings.

    Thanks.

    Monday, March 4, 2019 3:58 PM
  • Hi,

    Since this forum is discussing the setup and deployment of .net framework on windows, your problem is related to Web API project, please open a new case in asp.net forum to seek for better support. Thank you for your understanding.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 5, 2019 7:49 AM