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.

enter image description here

have tried:

<configuration>     <system.web>         <customerrors mode="on"                       defaultredirect="~/cs/showerror.aspx" /> 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -