Friday, March 2, 2012

Error page handling on IIS 7.x

only *.aspx, *.html, *.jpg... file gonna be handled by below..








as you can see from MSDN,
there is a configuration setting from IIS instead of asp.net router to handle all http error for all request

<system.webServer>

<httpErrors errorMode="Custom">

   <remove statusCode="401" subStatusCode='-1' />

   <remove statusCode="404" subStatusCode='-1' />

   <remove statusCode="500" subStatusCode='-1' />

   

   

   

</httpErrors>

</system.webServer>