Please do help me to customize azure 403 forbidden error page for Asp.Net. below is the picture what I am getting, if I return 403 forbidden.
Please do help me to customize azure 403 forbidden error page for Asp.Net. below is the picture what I am getting, if I return 403 forbidden.
There is a possible workaround: You can route all traffic to your WebApp via your own load balancer or Application Gateway, which allows you to create custom error pages instead of displaying default error pages. You can use your own branding and layout using a custom error page. Please refer to this documentation for further reference.
Using Portal and PowerShell, you can do configure the custom error page.

Using PowerShell for global custom error page:
$appgw = Get-AzApplicationGateway -Name <app-gateway-name> -ResourceGroupName <resource-group-name>
$updatedgateway = Add-AzApplicationGatewayCustomError -ApplicationGateway $appgw -StatusCode HttpStatus502 -CustomErrorPageUrl "http://<website-url>"
Using PowerShell for a listener level error page:
$appgw = Get-AzApplicationGateway -Name <app-gateway-name> -ResourceGroupName <resource-group-name>
$listener01 = Get-AzApplicationGatewayHttpListener -Name <listener-name> -ApplicationGateway $appgw
$updatedlistener = Add-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus502 -CustomErrorPageUrl "http://<website-url>"
For more information, see Add-AzApplicationGatewayCustomError and Add-AzApplicationGatewayHttpListenerCustomError.