title: Custom Error Pages Do Not Work
body: <p>While trying to figure out why the Global.asax would not work, I decided to move onto Custom Errors and started running into problems there. I am testing the 404 (Page not found) and it keeps giving me the standard server error page rather than my own page.</p>
  
  <p>I tried setting it on the IIS side of things and that did not work. In fact, having the settings match seemed to throw more errors. I have removed that change to return it to the current issue. I have provided the changes I made to make this error page. Perhaps someone brighter than me can figure out what went wrong?</p>
  
  <pre><code>&lt;customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/Error.aspx" /&gt;
  </code></pre>
  
  <p>Any help is widely appreciated! I did check to see if the Error.aspx exists and it does so I know it is not an actual 404 page not found issue</p>
  
  <p>EDIT: Tried suggested duplicate answers and it did not work</p>
  
  <p>EDIT 2: This is the error that appears on the screen</p>
  
  <blockquote>
    <p>HTTP Error 404.0 - Not Found</p>
    
    <p>The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.</p>
    
    <p>Most likely causes:</p>
    
    <ul>
    <li>The directory or file specified does not exist on the Web server.</li>
    <li>The URL contains a typographical error.</li>
    <li>A custom filter or module, such as URLScan, restricts access to the file.</li>
    </ul>
    
    <p>Things you can try:</p>
    
    <ul>
    <li>Create the content on the Web server.</li>
    <li>Review the browser URL.</li>
    <li>Check the failed request tracing log and see which module is calling SetStatus. For more information, click here. </li>
    </ul>
    
    <p>Detailed Error Information:</p>
    
    <p>Module
       IIS Web Core </p>
    
    <p>Notification
       MapRequestHandler </p>
    
    <p>Handler
       StaticFile </p>
    
    <p>Error Code
       0x80070002 </p>
  </blockquote>