Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC Error Handling - Remove aspxerrorpath

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... something like path

Can anyone give me some direction on how to change that out?

like image 870
Chase Florell Avatar asked Jun 04 '10 06:06

Chase Florell


2 Answers

Add redirectMode="ResponseRewrite" to the customErrors section. That worked for me.

like image 188
David Thompson Avatar answered Sep 27 '22 21:09

David Thompson


my wprk around is using

route.MapRoute("NotFound", "{*url}", new {controller = "Home", action = "NotFound"}) 

At the bottom most, which I have NotFound action in HomeController. It will simply catch all other urls.

like image 22
CallMeLaNN Avatar answered Sep 27 '22 22:09

CallMeLaNN