3
Vote

Not showing custom 404 error page when deploying to production

description

Hi there,

I have an issue with custom error page. For my website, I have designed custom 404 error page and enabled it from web.config. I have implemented FriendlyUrls for my website. When i am accessing any wrong URL without or with extension(.aspx) on my local machine, it is working fine and returning custom 404 error page. But when I deploy website on production, it is returning default (IIS's) 404 page, if I access wrong extension-less URL. I have cross-checked web.config many times but did not came-up with a solution.


Looking for your reply.

Thanks in advance!

file attachments

comments

babelshift wrote Sep 18, 2013 at 3:28 PM

I have this same issue, however, it does not work for me even on my localhost debugger.

Example:
http://localhost/site/fakepage is a non existent page, but when I access it, I get the default IIS 404 error page and the Application_Error method of of my Global.asax class is never called.

If I change it to http://localhost/site/fakepage.aspx then my custom error page works and the Application_Error method is called properly.