This has to do with your configuration and version of IIS your host is running. In versions of IIS before 7, or if you are running IIS 7 with the "classic pipeline", there are actually two channels that http requests go though. One handles .net requests though ASP.net, and the other pipeline goes to IIS. (i.e. ASPX goes to asp.net and .jpg goes to IIS)
In your case, non existent pages are going to IIS, this your asp.net congi you specified does not apply. I bet if you type in www.[domain].com/doesntexist.jpg it will not go to you custom page but if you type www.[domain].com/doesntexist.aspx it will.
Sp there are several solutions based on what version if IIS you have. If your host is using IIS7, then you can run the site with the Integrated Pipeline, meaning all request go through ASP.net and configuraiton will apply. Here is more info.
If you are not running IIS, you can only fix this by specifying the custom error codes in IIS itself. If this is the case, hopefully your host will allow this.
One other possibility for IIS6, would be to create custom handlers for non .net pages and files, and force them to route to asp.net, then your configuration would apply. This would not be desirable though as it could become a maintenance nightmare and additional code/configuration.
Related SO questions:
IIS overriding custom 404 error page in ASP.NET
How to get Custom Error Pages working for Classic ASP with IIS 7 Integrated Pipeline
Site not redirecting to Default Document in Classic pipeline mode