ASP.NET MVC Error Handling - Remove aspxerrorpath

前端 未结 5 1498
别那么骄傲
别那么骄傲 2020-12-30 22:45

I\'m working on some error handling in my MVC app, and I\'d like to change asperrorpath to something that doesn\'t give away the fact that I\'m using .NET... so

5条回答
  •  别那么骄傲
    2020-12-30 23:29

    The are many ways you can solve your problem. It depends what you want.

    1. You can edit section in your web.config And write default link for redirecting on error and also specify different links for different error like
    2. You can use HandleError attribute for your Controller/Actions. You can read about it here.

提交回复
热议问题