Exclude specific errors from custom error redirect
<p>Is there a good way to exclude some errors from being redirected to the default custom error page?</p>

<p>I'm using aspnet membership provider and have just discovered that if for example a user tries to change their email address to one that is already in the system, rather than show the error message warning in the style of a validation error as was designed, since I turned on custom errors, it just redirects to the standard error page.</p>

<p>Do I need to specifically exclude error codes for this problem?</p>

<p>Here is the custom error section in the web config:</p>

<pre><code>&lt;customErrors mode="On" defaultRedirect="/Error/Error500" /&gt;
</code></pre>

<p>Thanks very much</p>
