Error404 doesnt show

Topics: ASP.NET 2.0
Dec 30, 2010 at 10:14 AM
Edited Dec 31, 2010 at 1:25 PM

Though most problems here are about something which doesnt work and thus the custom 404-error is displayed, I actually have the opposite prob...
When I try to browse to a not-existing page, the custom 404-page (my own (error404NL.aspx) or the one supplied (error404.aspx)) doesnt show, but the standard "Server Error in '/' Application"-page is displayed.

There seems to be nothing wrong with the code in web.config:

<customErrors mode="RemoteOnly" defaultRedirect="~/error404NL.aspx">
<error statusCode="404" redirect="~/error404NL.aspx"/>
<customErrors mode="Off"/>

I've also included some code in web.config for 404-errors for non-ASP pages:

<httpErrors errorMode="Custom" existingResponse="Replace" >
<remove statusCode="404"/>
<error statusCode="404" path="/error404NL.aspx" responseMode="ExecuteURL"/>

Example of a non-existing URL:

Example of an existing URLs:

Custom error-page:

BlogEngine.NET version is running, everything else seems to be working just fine. Anyone got an idea why this happens?