ksrao720@yahoo.com:
I am able to handle the 404 error if the url has .aspx extension.
I want to handle that error in all the cases(for any kind of page like .htm,.asp,etc)is it possible?
Hi ksrao720,
By default the requests for those extensions will not be routed to ASP.NET isapi, so that ASP.NET runtime will not handle those reuqests at all. That is why the “CustomErrors” element in web.config has no effect.
As far as I know, there are two solutions for this goal. We can add IIS mapping to those extensions, then the requests for those extensions will be routed to ASP.NET isapi. Alternatively we can modify the default IIS 404 error page. I have posted both soltuions in the followoing thread. Please check them at your convenience.
404 Error page
http://forums.asp.net/t/1243196.aspx
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.