title: Asp.net - Web.Config - Custom Errors
body: <p>How can I set 404 and other error pages using web.config? I have tried adding following block in web.config.</p>
  
  <pre><code>     &lt;customErrors defaultRedirect="Forms/Errors/Page_404.aspx" mode="On"&gt;
      &lt;error statusCode="500" redirect="servererror.aspx" /&gt;
          &lt;error statusCode="403" redirect="NoAccess.htm" /&gt;
          &lt;error statusCode="404" redirect="Forms/Errors/Page_404.aspx" /&gt;
      &lt;/customErrors&gt;
  </code></pre>
  
  <p>but still its showing default error page of IIS7. How to fix this?</p>