CustomErrors will only fire for files which .NET is actually assigned to handle. On your local Visual Studio this covers everything, but in IIS6 it only covers the files that are actually directly related to .NET (.aspx, .ashx, .asmx etc). This means that if you want it for everything you have to add an ISAPI filter to bind all files to be handled by .NET, which comes with overheads and can cause some unexpected behavior if you have any global handlers or HttpModules defined.
This page will help you with configuring a wildcard binding if that's the road you want to go down
Have you considered putting it in the IIS6 configuration instead of .NET? This may be simpler for you than trying to use the CustomErrors from .NET in IIS6.
As a sidenote IIS7 integrated pipeline mode does not have these issues and all files are handled by .NET by default.