I am trying to set a custom error page " 404.aspx" , configuring settings in
For some reason IIS 6.0 is displaying its own default 404 error page instead of using redirect setting page "404.aspx".
i also have tried setting message type to "URL" instead of "file" and pointing to "404.aspx" in virtual directory and checking "checck for file exist"..this didn't worked out.
IIS 6.0
Custom error page configuration
can someone please share your thoughts on this issue.
Thanks,
kumar
kumar kPosted May 19, 2011, 3:24 PM
also finally, These are the things i did to make it work:
a) configured custom error page through website properties providing URL as messagetype, mapping to PageNotFound.aspx (my custom error page in virtual foldeR).
b)also have my config settings included in webconfig as below.
Initially i was testing on "pagenotfound" --->resulted in my custom PageNotFound.aspx which i configured through website properties.
also for some reason, i have some issue in the backend ...which resulted my app to show Error.aspx.
So config settings are doing well . Finally am good with custom error pages in iis6 for now...if the same works for every1 then this will be the ans for the post.
thanks,
kumar
Abhimanyu K VatsaPosted May 19, 2011, 1:56 AM
kumar kPosted May 18, 2011, 3:06 PM
a)Webconfig settings for Custom errorpages has nothing to do with....this settting never replicated the app behaviour.
b)on my website ..properties, i have applied custom errors settings ..i have mapped the .aspx from my virtual folder like this
MessageType: URL
and URL was like : /VirtualFolder/Website1\ErrorsFolder\ErrorPage.aspx
this worked out well ....iis 6.0 is now accepting my custom .aspx error page .
My NEXT question is ...why is the webconfig setting ignored? what if I need some other page to be displayed for some other error code?
appreciate your time ..
Thanks,
Kumar
kumar kPosted May 18, 2011, 2:18 PM
this was already set as allow for Active Server Pages.....no luck
Thanks,
Kumar
Suthish NairPosted May 18, 2011, 2:16 PM
kumar kPosted May 18, 2011, 2:06 PM
These tweaks didn't work out..again getting the same error...no luck this time....do u have any other clues where i can fix this? Should we configure Custom error pages in iis6.0
in some diff approach? after a lot of search i'm here....thanks for the replies.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
Thanks,
Kumar
Suthish NairPosted May 18, 2011, 2:01 PM
<customErrors mode="On" defaultRedirect="~/Errors/Oops.aspx" redirectMode="ResponseRedirect">
kumar kPosted May 18, 2011, 1:50 PM
Thanks for the reply.
here you go, this is my config setting . This is not working...on wserver 2003, iis6, my app is 2.0 .
Thanks,
Kumar
customErrors mode="On" defaultRedirect="/Errors/Oops.aspx" redirectMode="ResponseRedirect">
Suthish NairPosted May 18, 2011, 1:27 PM
use attribute redirectMode="ResponseRedirect" for .aspx file.
or instead of 404.aspx use an static .html file.
or use mode="On".
refer discussion