I have this scenario:
A user comes to my site and followes a link, wich doesnt exists anymore, he should be redirected to a custom errorpage. (that works)
If a user does something, that throws an error, he should see the Stacktrace and the real Errorpage.
This is my current Web.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<customErrors>
<error statusCode="404" redirect="/errors/404.htm" />
</customErrors>
<compilation debug="true" strict="false" explicit="true" />
</system.web>
</configuration>
with this configuration, a 404 will be redirected to the right site, but a HTTP 500 will be shown as following:
Server Error in '/' Application
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web [.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
[...]
But in this case i want to show the stacktrace.
How can i do this?
Note: We're on Linux with a Mono <- FastCGI -> Lighttpd construction.