When the URL contains%, we receive error code 400. Windows Webapp will have this issue, while Linux Webapp will not

Gallatin 21V 186 Reputation points
2024-04-09T01:46:23.63+00:00

We found the url which contains % often return 400 error. Can you help to suggest how to redirect the 400 error page to root path or home page.

We suspect that different operating systems have different IIS, and Windows Webapp cannot handle special characters.

This issue is very urgent, please answer us. Thank you.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,782 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 26,141 Reputation points Microsoft Employee
    2024-04-10T19:46:10.33+00:00

    @Gallatin 21V , Based on my understanding, you are looking to configure custom error pages.

    Custom error pages are for errors that terminate on the Frontend (which means that the request that doesn't make to your app).  Once the request gets to the app it is assumed the user can use whatever error page they want.

    How-to configure a custom error page on App Service

     

    App Service now enables the use of custom error pages for 403, 502, and 503 error codes so you can customize your users experience. It's available for both Linux and Windows workloads using at least a Premium SKU. The following is a tutorial on how to upload a custom error page to your Web App.

    Custom error pages is currently available to try as a preview feature

    Also, please checkout this discussion thread.


    If the answer helped (pointed you in the right direction) > please click Accept Answer

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.