The main idea is that Azure is runnin on IIS7, so you have the power to plug-in into the integrated pipline mode.
< statuscode="404" responsemode="ExecuteURL" path="/page-not-found.aspx">
< /httpErrors >
< /system.webServer >
Put the configuration in system.webServer, insted of in system.web.
I would also add a handler for 400 status code. This is if you are making some custom http handlers.