In your Web.Config you can handle it as such
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly">
<error statusCode="404"
redirect="Default.aspx"/>
</customErrors>
This should be added to he System.Web or merged with existing markup.
It hsould be noticed that this will only work for files that asp.net is
handling. Meaning if somebody requests bleah.html it will use the
default IIS 404 handler.
In order to get this behavior for all files you should set a custom 404
handler through IIS for that application/website.
This may or may not be offered by your web hosting company if you are
hosting with a ISP and you should contact them regarding this if so.