I've heard various wrong explanations for this phenomena, including "it only works under IIS" and "it only works in release mode". But the custom error view does work in debug mode and it does work with the Visual Studio WebDev web server. I think the most common reason for the error view not to display is because the error view throws an uncaught exception.
The first place to check when the error view doesn't render is in the error view itself. Make sure there isn't any code that might dereference a null reference, for instance, and run with debugging enabled to make sure.