title: Getting default 404 error page for unknown file extension even with custom 404 error page
body: <p>We have set a custom 404 error page in order to display a 'nice' page instead of the default IIS page.</p>
  
  <p>When trying to access a non existing page with a known file extension (e.g. <a href="http://mydomain/dumb.aspx" rel="nofollow">http://mydomain/dumb.aspx</a>), the custom 404 page gets displayed.</p>
  
  <p>When trying to access a file with an unknown file extension (e.g. <a href="http://mydomain/index.dumb" rel="nofollow">http://mydomain/index.dumb</a>), the default 404 error page gets displayed.</p>
  
  <p>What puzzles me is that the IIS Web core is handling the error:</p>
  
  <blockquote>
    <p>ModuleName: IIS Web Core<br>
    Notification: 16<br>
    HttpStatus: 404 
    HttpReason: Not Found<br>
    HttpSubStatus: 0<br>
    ErrorCode: 2147942402 
    ConfigExceptionInfo : 
    Notification: MAP_REQUEST_HANDLER 
    ErrorCode: The system cannot find the file specified. (0x80070002)</p>
  </blockquote>
  
  <p>But the configured custom error page is note taken into account:</p>
  
  <pre><code> &lt;httpErrors errorMode="Detailed"&gt;
      &lt;remove statusCode="404" subStatusCode="-1" /&gt;
      &lt;error statusCode="404" prefixLanguageFilePath="" path="/httpError" responseMode="ExecuteURL" /&gt;
  &lt;/httpErrors&gt;
  </code></pre>
  
  <p>We do have handler mappings for * but not for <em>.</em> . Could it be the cause of the issue?
  What would be the correct configuration?</p>