ASP.NET rewritten custom errors do not send content-type header
<p>I have the following configuration in my web.config:</p>

<pre><code>&lt;customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/Error/Error.html"&gt;
    &lt;error statusCode="404" redirect="~/Error/Error.html" /&gt;
    &lt;error statusCode="400" redirect="~/Error/Error.html" /&gt;
&lt;/customErrors&gt;
</code></pre>

<p>FWIW, this is an ASP.NET MVC 3 application.</p>

<p>When I generate an error. For example by visiting..</p>

<pre><code>http://testserver/this&amp;is&amp;an&amp;illegal&amp;request
</code></pre>

<p>.. which is blocked by ASP.NET request validation, the error page is returned, but there is no content-type header. IE infers the content and renders the HTML, however Firefix (correctly IMO) treats the content as text and displays the HTML code.</p>

<p>Are there additional steps that I need to take to persuade ASP.NET to send a content type header? I assume this is related to the fact that it's picking the files up from the file system, but the MIME types appear to be configured correctly on the server.</p>
