I have a C#.net site which displays custom error pages to the user. This is set in web.config:
<customErrors mode="Off">
<error statusCode="500" redirect="~/error.cshtml" />
<error statusCode="404" redirect="~/error.cshtml" />
</customErrors>
The problem is that if there is an error, I have no record of what it was. I'm familiar with PHP where I can set a location for the error_log file which I can then check for PHP errors. Is there a way to do something similar in .NET?