Error404 doesnt show

Topics: ASP.NET 2.0
Dec 30, 2010 at 9:14 AM
Edited Dec 31, 2010 at 12: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"/>
</customErrors>

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

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

Example of a non-existing URL:
http://www.geborgenheid.com/test.aspx

Example of an existing URLs:
http://www.geborgenheid.com/contact.aspx
http://www.geborgenheid.com/page/peuteryoga.aspx

Custom error-page:
http://www.geborgenheid.com/error404NL.aspx

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