Linked Questions
101 questions linked to/from How can I properly handle 404 in ASP.NET MVC?
139 votes
6 answers
172k views
ASP.NET MVC 404 Error Handling [duplicate]
Possible Duplicate: How can I properly handle 404 in ASP.NET MVC? I've made the changes outlined at 404 Http error handler in Asp.Net MVC (RC 5) and I'm still getting the standard 404 error page. ...
-1 votes
1 answer
4k views
MVC3 routing for any url [duplicate]
Possible Duplicate: How can I properly handle 404 in ASP.NET MVC? Suppose I have a site www.microsoft.com And I try to open the url www.microsoft.com/anytext www.microsoft.com/anytext/anynumber ...
2 votes
0 answers
57 views
ASP MVC not displaying proper error pages based on httpErrors configuration [duplicate]
I am using the latest version of ASP.NET MVC 5 for my web application and it is running through IIS 7.5 which came with Windows 7. I am struggling to implement httpErrors in the web.config and to have ...
122 votes
10 answers
170k views
Routing for custom ASP.NET MVC 404 Error page
I am trying to make a custom HTTP 404 error page when someone types in a URL that doesn't invoke a valid action or controller in ASP.NET MVC, instead of it displaying the generic "Resource Not Found" ...
77 votes
7 answers
83k views
ASP.NET MVC - Catch All Route And Default Route
In trying to get my application to produce 404 errors correctly, I have implemented a catch all route at the end of my route table, as shown below: routes.MapRoute( "NotFound", _ ...
83 votes
7 answers
90k views
ASP.NET Custom 404 Returning 200 OK Instead of 404 Not Found
After trying to setup my site for Google Webmaster Tools I found that my Custom ASP.NET 404 page was not returning the 404 status code. It displayed the correct custom page and told the browser that ...
53 votes
8 answers
100k views
How to make a catch all route to handle '404 page not found' queries for ASP.NET MVC?
Is it possible to create a final route that catches all .. and bounces the user to a 404 view in ASP.NET MVC? NOTE: I don't want to set this up in my IIS settings.
42 votes
6 answers
40k views
How to return a view for HttpNotFound() in ASP.Net MVC 3?
Is there a way to return the same view every time a HttpNotFoundResult is returned from a controller? How do you specify this view? I'm guessing configuring a 404 page in the web.config might work, ...
35 votes
5 answers
22k views
Error Handling in asp.net mvc 3
Is there a built in or a proper way to handle errors in asp.net mvc 3? This is what I want to do: If the application crashes, or throws an error, it goes to a specific error page. I can throw my own ...
20 votes
4 answers
18k views
404 Http error handler in Asp.Net MVC (RC 5)
How can I Handler 404 errors without the framework throwing an Exception 500 error code?
15 votes
6 answers
26k views
ASP.NET MVC4 CustomErrors DefaultRedirect Ignored
I have an MVC 4 app, using a custom HandleErrorAttribute to handle only custom exceptions. I would like to intercept the default 404 and other non-500 error pages and replace them with something more ...
28 votes
5 answers
21k views
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 ...
18 votes
4 answers
16k views
ASP.NET MVC user friendly 401 error
I have implemented errors handling in ASP.NET MVC site in a way like suggests this post. With 404 errors all works fine. But how correctly show user friendly screen for a 401 error? They usually do ...
14 votes
2 answers
9k views
ASP.NET MVC app custom error pages not displaying in shared hosting environment
I'm having an issue with custom errors on an ASP.NET MVC app I've deployed on my shared host. I've created an ErrorController and added the following code to Global.asax to catch unhandled exceptions, ...
12 votes
5 answers
18k views
ASP.NET Custom error page for 404 returns 302 for http status
In my asp.net web site I have custom error pages defined as following in my web.config file. <customErrors mode="On" defaultRedirect="~/defaulterror.htm" > <error statusCode="404" redirect="~...