Error Treatments 404 and 500

0

Good afternoon, my question is as follows as I am still new to asp.net and on the DDD I still have some doubt that it is in which layer using the DDD standard I would implement the 404 and 500 error handling, if would be in the presentation layer or in the same or any other layer and why it would be implemented in that layer.

    
asked by anonymous 30.11.2017 / 19:28

1 answer

0

Create inside Presentation / Views / Error /

Create two files Erro404.cshtml
Erro500.cshtml

Add the following line to your web.config

<customErrors mode="On" defaultRedirect="~/Error.html" redirectMode="ResponseRewrite">
  <error statusCode="404" redirect="~/Error/Erro404" />
  <error statusCode="500" redirect="~/Error/Erro500" />
</customErrors>
    
30.11.2017 / 20:09