in web.config file have specified custom errors:
<customerrors mode="remoteonly" defaultredirect="~/error"> <error statuscode="500" redirect="~/error" /> <error statuscode="404" redirect="~/notfound" /> </customerrors> now, links, such http://mysite.com/dsflhsdff redirected mysite.com/notfound. links, https://mysite.com/videoconference/0/0/0 handled server - instead of custom error page, getting iis error page (file or dir not found). in example link - https://scyk.pl/forums/0/0/0 produce proper 404 error (my custom error page).
what happening here? need set iis custom errors manually? if so, how can that?
this because asp.net never knows there has been request .htm page. iis handle .htm pages without involving asp.net @ all.
you can custom page show in 1 of 2 ways:
get asp.net process .htm pages: in iis rightclick website/virtual directory --> properties --> home directory/virtual directory tab --> "configuration" button under "application settings" section --> add mapping. set custom error page iis: in iis rightclick website/virtual directory --> properties --> custom errors tab --> set 404 error page error page.
Comments
Post a Comment