asp.net - Web.config - Specify default error page for errors -
i know can specify error pages according error type: 404, 500, ...
what i'm looking default error page error did not specify page for. example - if add a
<error statuscode="404" responsemode="executeurl" path="/.../404.aspx"/>
and 500 occurs - want go anyerror.aspx
. how do that?
you need specify 'defaultredirect' attribute in customerrors section of web config. see displaying custom error page (c#).
e.g.
<customerrors mode="on" defaultredirect="~/errorpages/error.aspx" />
Comments
Post a Comment