c# - Set common custom error page for all status code in web.config -
i setting custom page error in application web.config or iis.
an issue have set status codes below.
<httperrors errormode="detailedlocalonly">   <remove statuscode="401" substatuscode="-1" />   <error statuscode="401" prefixlanguagefilepath="" path="/cs/showerror.aspx" responsemode="executeurl" />   <remove statuscode="403" substatuscode="-1" />   <error statuscode="403" prefixlanguagefilepath="" path="/cs/showerror.aspx" responsemode="executeurl" />   <remove statuscode="404" substatuscode="-1" />   <error statuscode="404" prefixlanguagefilepath="" path="/cs/showerror.aspx" responsemode="executeurl" />   <remove statuscode="500" substatuscode="-1" />   <error statuscode="500" prefixlanguagefilepath="" path="/cs/showerror.aspx" responsemode="executeurl" />   <remove statuscode="501" substatuscode="-1" />   <error statuscode="501" prefixlanguagefilepath="" path="/cs/showerror.aspx" responsemode="executeurl" /> </httperrors>   i want solution allow setting custom error page once , work status codes following.
<httperrors errormode="detailedlocalonly" defaultpath="/cs/showerror.aspx" defaultresponsemode="executeurl" existingresponse="replace"> </httperrors>   unfortunately, above solution not work. idea how done?
currently, getting error following. don't want error page displayed want set custom page.
have tried:
<configuration>     <system.web>         <customerrors mode="on"                       defaultredirect="~/cs/showerror.aspx" />      
Comments
Post a Comment