Friday 18 October 2013

Redirect to custom error page when server or application get error 404 or 403 or 405

for Custorm

<system.web>
<customErrors mode="On" defaultRedirect="~/Error-page not found">
     <error statusCode="404"  redirect="~/Error-page not found" />
      <error statusCode="403" redirect="~/Error-page not found" />
      <error statusCode="500" redirect="~/Error-page not found" />
    </customErrors>
</system.web>




for Http-

<system.webServer>
 <httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL">
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/RFBij/Error-page not found" responseMode="ExecuteURL" />
      <remove statusCode="403" subStatusCode="-1" />
      <error statusCode="403" prefixLanguageFilePath="" path="/RFBij/Error-page not found" responseMode="ExecuteURL" />
      <remove statusCode="405" subStatusCode="-1" />
      <error statusCode="405" prefixLanguageFilePath="" path="/RFBij/Error-page not found" responseMode="ExecuteURL" />
    </httpErrors>
</system.webServer>

No comments:

Post a Comment

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...