Last post Aug 29, 2009 05:46 AM by rumsfo
Aug 23, 2009 06:50 AM|dtx_21|LINK
im not sure if i should be going to godaddy for this question or not, but heres my situation:
in my web.config, i have the default settings..
<customErrors mode="Off" />
in my host settings (godaddy), i have my "404 page designation" directing to
problem is i notice that when i enter www.mysite.com/nonexistingpage.aspx, i get this error:
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3072
but when i put www.mysite.com/nonexistingpage.html, it does direct me to the error.aspx page as expected. im guessing i have to set the 404 error in the customErrors in the web.config to take care of this. any advice will be greatly appreciated. :)
Aug 23, 2009 08:17 AM|HostingASPNet|LINK
This is their instruction for setting up a Custom 404 Page on shared hosting account -
It will be much better to talk with them about your problem. Do not forget to check also if it returns the correct 404 error code.
Aug 27, 2009 03:30 PM|Bruce L|LINK
The problem is actually very common (I don't know why MSFT makes it so confusing).
The custom error that you set in the hoster control panel probably is the IIS Custom Error. That means, it only handles file types that are not handled by ASP.NET. ASP.NET has it own error handling and is controlled by the web.config.
Add something like this into your web.config should fix it.
<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx"> <error statusCode="404" redirect="~/errors/404.htm" /></customErrors>
Aug 27, 2009 09:04 PM|dtx_21|LINK
thanks bruce, that worked.
Aug 28, 2009 02:26 AM|webhost.uk.net|LINK
Aug 29, 2009 05:46 AM|rumsfo|LINK
I assume that first of all yuou need to have permission from web hosting company for that