In another similar case:
For customization, you may edit web.config file located in D:\home\site\wwwroot folder.
You may try this code (copied below), answer from a similar SO discussion thread.
For more details on customErrors flag.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" path="/404.asp" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
If this helps please mark as correct answer or upvote.