I have page i.e. Default.aspx. I can handle error pages like 404,403. But when I change the extention of page then server give me an error.If I change Default.aspx to Default.asasd. Here I have just changed the extention of page then server gives following error

I added 404 error page in my web.config file. How can I solve this?
Web.config
<customErrors mode="On" defaultRedirect="~/ErrorPages/DefaultErrorPage.aspx" redirectMode="ResponseRedirect">
<error statusCode="404" redirect="~/ErrorPages/404.aspx" />
<error statusCode="403" redirect="~/ErrorPages/403.aspx" />
</customErrors>