When I was doing a project at work I was tasked with setting up a 404 page for an ASP.NET website, and generally just making sure there wasn't any conflicts. As I am normally a PHP developer I figured it wouldn't be too hard as its very easy to assign a 404 error to a certain file with Apache using a .htaccess file. I was about to be very put off by how difficult it was to actually get this working, and further more, how under-documented it was online. So I decided to write up a very quick and easy instruction manual.
This does assume access to the main server, for people on shared hosting you will probably have something in your cpanel equivelant which will assign a 404 page for you.
1. Place the follow code into a file called web.config inside your base directory of your website (normally c:\inetpub\wwwroot\)