Hi @Anjali Agarwal ,
CustomErrors mode
is for Yellow Screen of Death (YSOD), but the error page you show is not YSOD. So the application doesn't show a friendly page to user.
By the way, set mode="RemoteOnly"
is better than On
. If possible, please set it like this.
- On – If defaultRedirect is specified, they will see that content. Otherwise, the default error screen with fewer details.
- Off – Detailed error details will be shown to the user. (the “yellow screen of death screen”)
- RemoteOnly – Default value. Detailed errors only are shown to local users. Remote users receive custom error screens or fewer details.
A friendly error is displayed when viewed by a remote user, and the developer can obtain detailed errors through local access. Avoid modifying the mode every time you debug.
IIS has a Error Pages module to allow users custom error page to avoid showing detailed error pages which you post.
You can add custom error page for 413.1 status code.
It also allow you to set detailed error message for local access and custom error page for remote access.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Bruce Zhang