We\'re migrating an existing website from IIS6 to IIS7, but are experiencing some difficulty in setting up the 404 error page. Our 404-errorpage works like this:
Alternatively you could look at using the IIS addon module: URLRewrite. This will allow you to set up custom SEO friendly URL's. You might find this something you want to look at to improve your application going forward rather than as a fix for your existing issue as may require some time to learn.
There's some excellent articles, video tutorials and info on how to use this tool.